Busy = false --> The door isn't busy because it hasn't started yet
Open = false --> The door isn't open yet, because you haven't pressed the button
script.Parent.Touched:connect(function(Hit) -->This is the connection line to check if the brick has been touched
if Hit.Parent:findFirstChild("Humanoid") ~= nil then --> If the thing that touches me has a Humanoid then
if not Busy then --> If it's not busy
if not Open then --> If it's not open
Busy = true --> It's now busy
for X = 0, 1.5, 0.1 do --> Move the doors
Workspace.BrickD.CFrame = Workspace.BrickD.CFrame + Vector3.new(0.1,0,0)
wait(0.2)
end
for X = 0, 1.5, 0.1 do --> Move the next set of doors
Workspace.BrickA.CFrame = Workspace.BrickA.CFrame + Vector3.new(0.1,0,0)
wait(0.2)
end
for X = 0, 1.5, 0.1 do --> Move the next set doors
Workspace.BrickB.CFrame = Workspace.BrickB.CFrame + Vector3.new(0.1,0,0)
wait(0.2)
end
for X = 0, 1.5,
Playing
0
Visits
2
iVisual has no creations.
Starting Roblox...
Connecting to People...
Check Remember my choice and click in the dialog box above to join experiences faster in the future!
Thanks for visiting Roblox
1
Click RobloxPlayer.exe to run the Roblox installer, which just downloaded via your web browser.
2
Click Run when prompted by your computer to begin the installation process.
3
Click Ok once you've successfully installed Roblox.
4
After installation, click Join below to join the action!