gastrof said:
Scotty, apparently not yet retired, saw Kirk die.
Later, after having retired, he's in the Jenolan crash and has to wait in the ship's transporter for Enterprise D to rescue him. He then...
...ummm...
...makes a comment about expecting Kirk to be in charage of the rescue mission.
Hmmm...
Seems the Scotty that was rescued hadn't yet experienced Kirk's death.
While in the 24th century, Scotty learns of Kirk's death, and is surprised to note the accounts say he was there...when he has no memory of the events. (Enterprise D's copy of Federation records apparently doesn't mention Scotty's death...he's not mentioned as having been on board the Jenolan.)
Scotty realizes he's not supposed to stay in the 24th century, and is supposed to go back to the 23rd.
He also learns of the creation of Thomas Riker by way of transporter accident...and gets an idea or two.
After returning to the 23rd century, Scotty waits until Kirk's orbital skydiving escapade (filmed but edited out of the final version of GENERATIONS), and hits Kirk with a transporter beam setup to replicate the twinning of Riker into two identical men.
One Kirk finishes his skydive, and is later lost on Enterprise B.
Another, however, was materialized by Scotty elsewhere, just as real a Kirk and no more a "copy" than the other, who reappeared in the air to finish his skydive a moment after the original Kirk was dematerialized...and turned into two. (As was Riker.)
Scotty explains to the Kirk who's with him what's going to happen, and possibly even lets that Kirk think the one about to be lost is only a "copy".
He also explains that future history says Kirk was "lost" on Enterprise B, and they'll have to do something to prevent the timeline from being altered.
Kirk eventually travels to the 24th century, and scares the pants off Picard before moving on to new adventures.