The following contains spoilers for Spider-Man: Into the Spider-Verse.
Stan Lee's traditional cameo in Spider-Man: Into the Spider-Verse is quite a touching moment. It would have been an emotional experience for fans regardless, as the movie has come out so soon after the death of the iconic creator of the character. However, the scene couldn't be more fitting, as Stan's lines feel like they were made for a moment just like this one. It seems almost too perfect, which makes the fact that the sequence could have played out quite differently all the more surprising. Into the Spider-Verse co-writer Rodney Rothman says that Lee's lines were delivered in a number of different ways so the scene could have been handled very differently. According to Rothman...
The thing that was interesting for us is that it evolved. We recorded it a year ago and it was not that long after his wife [Joan] had passed away. We had versions that tried a little harder to be funnier and tried a little harder to be harder. What ended up in the movie were the lines that had the most meaning to him.
Stan Lee appears at the perfect time in Spider-Man: Into the Spider-Verse. The Peter Parker of Miles Morales' universe has died and Miles has made the decision to try and take over the mantle. He purchases a Spider-Man Halloween costume and Stan Lee ends up being the one ringing up the purchase. Stan says that he'll miss Spider-Man, as the two used to be friends. Stan Lee says goodbye to his greatest creation as millions in the audience use the same moment to say goodbye to Stan.
It seems that part of the reason the scene was so poignant was that Stan Lee himself was saying goodbye when he recorded the lines. Rodney Rothman revealed to Indiewire that Lee recorded the lines shortly after the death of his own wife. While Lee also tried to make the scene funnier, in the end, the version of the scene that was decided on was the one that clearly meant the most to Stan Lee in that moment.
However, the fact that we could have seen a much more intentionally humorous version of the cameo isn't the only way the scene changed over time. Rodman also reveals that originally, Stan Lee tells Miles Morales that the costume never fits, but during recording, they made a spur-of-the-moment decision to change the line to "it always fits...eventually."
In the moment, he has to deliver just enough to get that kid to put the suit on.
It feels right that the man helping to pass the torch between Peter Parker and Miles Morales in Spider-Man: Into the Spider-Verse is Staqn Lee. He's the one telling the kid that it's ok, that, while it won't be easy to fill the shoes of the original, it can be done. I'm not sure anybody will ever fill the shoes of Stan Lee, but we're all glad we knew him as much as we did.