How I can make a rideable moving platform?

Hello. Firstly let me explain the title. We can make moving parts that can visit A point, then B point with tweening or another way. But I want the platform to move the players. Like in platform games. How I can do that?

Thanks for the reading :smiley:

2 Likes

Weld the player to the platform, if they want to move, then update the weld based on where they want to move.

1 Like

You may use Bodypower, bodygyro. Something like that.

2 Likes

How I can do that. With a loop or anything?

That will create extreme lag for the game and it will be broken sometimes and character can get glitched.

1 Like

Try using this script:

local conveyor = script.Parent

conveyor.Velocity = conveyor.CFrame:vectorToWorldSpace(Vector3.new(0, 0, -conveyor.Configuration.Speed.Value))

conveyor.SurfaceGui.Enabled = false

Hopefully this helped! :slightly_smiling_face:

1 Like

Why would it cause extreme lag?

Because the characther is always moving even tough we don’t click W-A-S-D etc…
and script will be like looping, even we may not see the lag, it will still lag in-game

Just use an event like get touching parts, or maybe even also get parts in region3 depending on if the platform is moving along an axis. And only update the weld if the player moves, otherwise, you can just leave it as the player will move with the platform the player is welded to.

What is that Surface Gui meant to?

How I can use them for this? I made a research about this but couldn’t find it.

Use BodyPosition | Roblox Creator Documentation inside the platform, it will drag players on top of it along with it.

1 Like

Just in case you have a SurfaceGui on your platform. Like for example mine had some lines on it.

1 Like

Do you not understand welds? They lock the player to the part, so the player is moving with the platform, and only when the player moves (via input) would the weld update. What you’re suggesting would happen would defeat the entire purpose of welds.

i guess this should help you, i learned by this video it like 2years ago, it should still work
1 Like

Take a look at this topic

Jailbreak train platform system? - Help and Feedback / Scripting Support - DevForum | Roblox

It only works with BodyMovers? or can I use it with Tweening?

I don’t understand welds, yes. But I know that something, if player clicks W or something, character will not move, so how will you update the weld?

Yes i think only body movers will do it.
Though, you could tween the values inside the bodymover

So I can’t use Body Position with Tweening? I meant that.