(NOTE: I need this for UNANCHORED parts, not anchored ones. I’m so sorry for the confusion.)
I want to make it so that when a player is on a part, and that part is in motion, the player stays ontop of the part and is able to walk around and jump without changing location. Some players are already able to do this, but there are frames where they can slide and fall off. (And laggy players don’t stand a chance, either.)
How could I do this? A script that affects all parts instead of individual ones would be nice, just for simplicity.
Edit: Honestly, I feel like this should be an official feature, like something you can toggle.
I think your best option is to change the assembly linear velocity of the part as it moves. There was a very good youtube tutorial, I can’t seem to find it but basically they use a few math functions using renderstepped delta time and the change in position to then set the velocity of that part. Since the part is anchored, Roblox physics cant affect it but your player model will follow it
I’m unsure what you could do, but I’ll throw some ideas your way. Maybe add a touch part, and whenever a player is on the vehicle, use a weld constraint on their primary part.
Yeah. The part should be able to move around, since it’s part of a train. If a player stands on the train or in something the train is pulling, they should be able to stand and walk around without the risk of glitching and falling out onto the track.
have you made anything and tested this out? depending on how you are moving the train, if its unanchored then it would have linear velocity? I might be mistaken but.
Welds would stop the player from moving. When on the train, I want them to be able to move around normally as if the train was idle, without glitches such as sliding off or jumping causing you to fly backwards.