I'm having trouble creating a moving platform that players can walk on

It’s been difficult, I’ve tried a bunch of different solutions but I can’t really find one that works effectively.

What I want to do is make it so that a player can walk across a platform that’s moving, and walk across it safely. I want the player to follow it, even be able to jump without them falling behind. I want a completely safe platform as if it wasn’t moving in the first place.

Normally, whenever something is moving, there’s a chance that the player can be desynchronized from the platform. There’s a lot of desynchronization that can go on, such as when they jump, friction related desynchronization, mismatched velocity values, and other things like that. I’m trying to solve this problem, so that players can easily walk across it without having to worry that they’ll fall behind or clip through blocks or any weird glitches.

Do you have any suggestions for me?

4 Likes

You need to move the platform with physics. Just tweening the part from one place to another will not bring players along with it. You could, I suppose, set the velocity of the anchored part while it is being tweened… but that breaks down and doesn’t work if the part rotates.

3 Likes

When players jump, they’re no longer being applied by the physics of the part. Jumping decynchronizes them entirely. Additionally, in the event there’s problems with the client’s network, they won’t properly synchronize with physics changes either. Additionally, collisions don’t really work the best and players can very easily clip through parts.

1 Like

That’s a lot harder to add, unfortunatly. Humanoids don’t experience inertia, and I’m not really sure if parts do either. There’s hacky methods with raycasting and bodymovers you could try, but that’s about it.

2 Likes

Here’s a model I made for someone else using a PrismaticConstraint.

If you’d searched the forums you would have found a lot of similar topics with solutions already.

1 Like

I’m sorry, but none of the solutions are as effective as I desire them to be, including yours. For example, when I jump, it has the same problem. My character stops on a dime and does not follow the platform.

1 Like

Maybe it’s possible to change the core PlayerModule to momentarily stop the instant inertia brake?

2 Likes

I was thinking of this and experimenting. I’ll see what I can do.

1 Like

If you’re willing to use beta features, a simple solution is to use the new humanoid controller https://devforum.roblox.com/t/new-humanoid-physics-controller-beta/1999211
Check out this forum post to see what features the new controller provides.

If not, there are ways to move the player along a moving platform without messing with the player’s humanoid such as in this post.
https://devforum.roblox.com/t/jailbreak-train-platform-system/236339
The solution in this post changes the CFrame of the character relative to the platform they were standing on every frame using Runservice.Heartbeat. This causes the character to move along with the platform even if they jump. For your case, consider using a similar system. If you need to know anything else, feel free to ask me.

2 Likes

This is exactly what I was looking for, the Humanoid Physics Controller seems to be the way to go. I never even knew of this beta. Thanks for the information!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.