The Last Jedi director Rian Johnson asked for a major change at the end of Star Wars: The Force Awakens
Johnson engineered an important reunion at the end of Episode VII

It seems R2-D2 only ended up visiting Luke Skywalker on his island in the last scene of Star Wars: The Force Awakens after Rian Johnson told JJ Abrams that BB-8 wasn't the droid he was looking for.
As he prepared to begin filming the next movie in the franchise, The Last Jedi director Rian Johnson intervened to make a special request.
Originally JJ Abrams' movie The Force Awakens was meant to end with Rey and BB-8 standing across from Luke, but Johnson told Entertainment Weekly: "I asked if R2 could come with Rey, and if BB-8 could stay behind with the Resistance. Originally it was BB-8 who went with Rey, which makes sense for the story in a way.
"But I asked, ‘Can you do me this solid and switch the droids?"

Abrams obliged, allowing Johnson to bring Luke together with his old buddy R2 instead of leaving him behind in perpetual sleep mode.
And leaving BB-8 with the Resistance also means he will have a key role to play in pilot Poe Dameron's storyline – even if that means spending less time rolling along next to Rey.
Star Wars Episode VIII: The Last Jedi will be released in December 2017
Authors
