My Moving Platform Script Is Not Working

Hello everyone,

I have recently made a moving platform in Roblox Studio but for some reason it is not working. Here is my code:

local platform = model.Platform
local start = model.Start
local finish = model.Finish
local bodyPosition = platform.BodyPosition

while true do
    bodyPosition.Position = start.Position
    wait(6)
    bodyPosition.Position = finish.Position
    wait(6)
end

I have created three parts: The moving platform itself (Platform), the start (Start) and the finish (Finish). In the Platform, I have placed a BodyGyro and I have also placed a Body Position. I have turned CanCollide off the Start and Finish and I have also turned anchored off in the Platform. So for some reason when I run the game, the platform just directly falls down to the floor. I’ve tried searching it up on Youtube and even tried a tutorial but nothing helped. (The parts are in the air, and the Start and Finish have anchored on.)

Any kind of help is appreciated.

Regards,
eraytopal61

3 Likes

Notice how you set the BodyPositions position with the same value? Its not even moving because its in the same spot.

2 Likes

Oh yeah, thank you for telling me!

I changed it and now it still doesn’t work, all it does is fall directly to the ground still.

1 Like

Parent the BodyPosition onto the part

1 Like

I have already done that, the Platform is the parent of the BodyPosition. But whenever I run the game, all the Platform does is fall down.

Hmm, the only thing i can think of is the MaxForce of the BodyPosition. Try increasing that and see what happens.

2 Likes

This is a start!

It still doesn’t lift up but now it slides on the ground.

Interesting. Try increasing it abit more or setting the MaxForce to math.huge

BodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)

I dont really reccomend this because it rarely messes with physics but it works most of the time.

Also, you should check if your Start and Finish platforms are intact.

The script didn’t necessarily change anything in the game play.
My platforms are perfectly intact.

To be honest, I kind of like the movement of the platform on the floor. So thank you for fixing that. Now this is solved.