We are looking to make a player walk, ride a pegasus on foot and on air. I am looking into how we can best structure the scripts for this. As per the one of the topics here (Player Entering Vehicle), this will be possible if we have trigger detection, playing a couple of animations and changing control modes in code. What would be the best way to structure the scripts to get them to work seamlessly?
I already have working controls for walk, ride, and fly in three separate .js scripts. However, when I try to switch control methods (changing scripts), I end up spawning where I started (0,0,0) as opposed to where I should be after walking/riding/flying a few mins. Is this due to it being written in different scripts? Should we just include all these controls in one script bunched together in if-else statements?
Thank you so much for your patience and hospitality. Still fairly new here and I am trying to grasp everything with tutorials and whatever resource I can get.