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

How do I make a slide door with two sides?

Asked by 10 years ago

Im trying to make like when someone goes to the door it slides. Is there anyone out there that can help me? I need it for a project im working on.

1 answer

Log in to vote
0
Answered by
ultrabug 306 Moderation Voter
10 years ago

I may suggest that you use a touched event w/ invisible bricks to detect when to open the door. Then once you know when to open the door, you can use a for loop to change the door's CFrame, here is a little example.

door.Touched:connect(function(hit)--touched even
    if hit.Parent.Humanoid ~=nil then--detecting if the part that touched belongs to a player
        for i=1,100 do--for loop, it will run 100 times.
            door.CFrame=door.CFrame + Vector3.new(0, 0, 0.1)--editing the door's CFrame
            wait(0.1)--waiting...
        end
    end
end)
Ad

Answer this question