How to fix players disrupting train movement by moving inside cab

Im making an automated train for a city, and I have everything scripted and rigged, but the problem is when there is a player inside the train moving around or trying to sit down, it seems to affect its speed and glitches out sometimes when slowing down to enter a station. It would overshoot or undershoot the platform.

This wasnt happening when I tested it with noone inside, everything worked as I wanted it to be.

Is there any solutions to this issue?
Train Overshooting Doors:


Train During Perfect Testing:

2 Likes

Hello,

Im not really a professional for this but from my knowledge :

When a train has a players in it, it effectivily affects the train speed since the player has a connection that could probably be unstable with the train. With multiples players, it also happens.


From me, i would suggest changing the train speed arrivals at the station slower than it should be, it could probably reduce the chances of overshooting, but if it undershoot, i would also suggest from my mind, a brick with a script that when your train hit it at a low speed like 5 Kph, it forcefully stop at 0 Kph.

Another suggestion is by adding an invisible wall in front of the station that has collisions activated, and when the train comes at the station, it should hit it to not get a overshooting, and then when the train departs, the invisible wall gets collisions deactivated, to let the train go.


I’ve also heard about trains using something like a Tweenservice movements or something, when the trains follow the tracks with attachements.

Its much more complicated, but it seems the players do not seems to affect the train, and it is moving like normal, but i don’t have much knowledge from it.