Prevent players from affecting train

I have made a game where there is a self-driving train operating between stations. However, should the players glitch onto the track or push the train off the track or if the train hits a player, the train might derail. How do I prevent the players from affecting the train movement. I have assign the players and the train tires have separate collision group so they can’t collide, as well as made the tracks kill parts so players cant get onto the track. I have made the players massless too. However, the players can push the train body whilst being on the station platform and in some instances, derails the train

1 Like

With physics-based trains this is nearly impossible with NetworkOwnership. I recommend increasing the density of the train or switching to something that the server doesn’t use, like a CFrame train.

1 Like

I have no idea how CFrame works at all so Im just going to increase the density of the train as to your suggestion

1 Like

is there a type of weld that enables the train to not be derailed while at the same time, enabling it to move

1 Like

Make the bottom of the train non-collidable while moving and once it stops, allow it to be collidable or you could just keep it non-collidable. No scripts needed if option 2.

1 Like

woudnt that cause players on the train to fall onto the tracks

1 Like

You would make a collidable, solid floor. Just the bottom, like tracks and base can’t collide. I don’t know how the train operates so if I clips through the ground, you could leave some stuff untouched.