Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How does this script cause players to fall through?

Asked by 6 years ago

So I made a block with a timer and once the timer goes off the block moves up like a timed elevator. The purpose is for players to be able to enter the map on it. But once the Block starts to move, the players automatically fall through. Can Collide is checked aswell so I don't know what the problem is.

speed = 1300


wait(10)
local startingPos = game.Workspace.Elevator.Position
        local endingPos = game.Workspace.Elevator.Position + Vector3.new(0,30,0)
        local elevator = game.Workspace.Elevator

        for ratio = 0,speed,5 do
            local newPosition = startingPos:lerp(endingPos, ratio/speed)
            elevator.Position = newPosition
            wait()
        end

        wait(10)

        local startingPos = game.Workspace.Elevator.Position
        local endingPos = game.Workspace.Elevator.Position + Vector3.new(0,-30,0)
        local elevator = game.Workspace.Elevator

        for ratio = 0,speed,5 do
            local newPosition = startingPos:lerp(endingPos, ratio/speed)
            elevator.Position = newPosition
            wait()
        end

1 answer

Log in to vote
0
Answered by
DanzLua 2879 Moderation Voter Community Moderator
6 years ago

Yea that happens sometimes when your constantly changing the Position of a part and your standing on it. We can use different methods if you want to achieve this, for example if your using a BodyMover you wouldn't have a problem, or you could weld the Humanoidrootpart to the part thats moving then this script would probably work

Ad

Answer this question