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,