Make players stick to moving parts

I need to make it so that players stick to unanchored parts when those parts are moving. Currently, you can kind of stick to parts, but after a while you’ll start sliding, and will fall off eventually. I’ve seen a lot of games do this, like Jailbreak and The Express Express, where you stay perfectly still on moving vehicles, no matter the speed.

If possible, I want to make it so I won’t need to add any extra parts, and instead it applies for all unanchored parts that the player is standing on. Doesn’t need to include scripts for jumping, but that’d also be nice. Thanks to whoever can help!

2 Likes

you’ll probably need to put a script in the player that detects what its standing on, if the thing is unanchored and moving you can create some form of constraint to hold you in place.
I believe this is the best way to go about it

This post should solve your problem.

2 Likes

That checks for parts with specific names. What would I need to change in this for it to apply to all parts?

I checked the link @Lava_shield sent and all you would have to change is:

if Hit and Hit.Name == "RaftTop" then

To:

if Hit and Hit.Anchored == false then

Think this should do the trick!

I’ll try it later and get back to you. Thanks!

Just tested it and it does work.

1 Like

Playtest is way different than an actual server. It doesn’t work, it creates a ton of errors, like 50 every second.

Bit late but the best/easiest solution is to move your parts using BodyForce objects. You have to use Roblox physics to move the parts if you want it to apply the physics of your Robloxian and allow your Robloxian to stay on it. Since you said “unanchored parts” this would be your best bet. Granted if you jump, you won’t land where you jumped from but that’s just physics.

Edit: If this doesn’t solve your problem maybe attempt to revise your use-case (For example slower movement and create illusion of fast movement)

1 Like