I'm not asking you to script a plane for me, I'm just wondering how it is done without requiring a tool in the process. My initial theory was that the script to control the plane would be in the seat of the plane itself and that when the seat's occupant was changed, it would inject a local script into the player character that would hold all the keyboard input and that the plane would only accept input from that player, but it didn't seem to work and probably is too complicated.
I've also remembered vaguely from attempts I've made years ago that there is an onSit function, but I haven't been able to find my old notes or any new information on this.
Just a reminder that I'm not asking you to come up with a whole script, but if you can add at least some pseudocode to help explain your answer, it would be appreciated.
My solution was to have the plane control script inside the player and then have the script become enabled when a player sat in a vehicle's seat and disabled when the player got out.