My trains move via tween. However, the player won’t stay on it. My initial solution was to set the floors velocity to match; however, it is too buggy.
I tried looking for scripts on DevForum. They either don’t work as intended or I just can’t understand their instructions.
I’m at my ends meet. I have tried everything. Raycasting, GetPartsinParts. It won’t work.
A complicated way I achieved a train that is moving and having NPCs and players being able to walk on it without jittering or “left behind” was by welding all passengers with Motor6d’s, so when train is moving all passengers are welded and following the train, and when a player or NPC wants to move, they will feed a function to change Values of the Motor6d that is welding it to the train, so their characters seems like walking on the train platforms but are really anchored.
Im not saying thats the best or easy way… but it did work for me. Btw… just ignore this, cause you will need a custom AnimController too
As I said, you could ignore my suggestion cause it requires for you to create a custom AnimationController, overriding the normal player movement and include your own keybinds and reading their inputs to decide where players are moving in order to change the values of the Motor…
I just did this for fun, not using it on a public project, Im quite sure it works well, but, took me long time to achieve it… and its pretty complicated (at least for me), so if you find an easy way, better stick to that.
Ah Ok. I think I am just going to weld the players onto the train and unweld them at every station if they are not sitting down. Thank you for your help tho!