This code is designed to open a 50 part door in sequence, change a variable in a folder in Workspace, and then if that variable is "Open", close the door. If it is "Closed" open the door. When I ran it through it doesn't even print anything. I would like some help from the script mastas. It doesn't function, or even print.
Test = game.Workspace.Values.Test.Value
Door = game.Workspace.HoloDoor.DoorVisible
sin = (0)
debounce = false
script.Parent.MouseButton1Down:connect(function()
if debounce == false then
debounce = true
wait(sin)
if Test == "Closed" then
for i = 1,50 do
local DoorPart = Door["P"..i]
wait(sin)
DoorPart.Transparency = 1
DoorPart.CanCollide = false
game.Workspace.HoloDoor.DoorFrame.Barrier.CanCollide = false
Test = "Open"
print("Open")
end
if Test == "Open" then
for i = 1,50 do
local DoorPart = Door["P"..i]
wait(sin)
DoorPart.Transparency = 0
DoorPart.CanCollide = True
game.Workspace.HoloDoor.DoorFrame.Barrier.CanCollide = True
Test = "Closed"
print("Closed")
end
end
end
end)

4 comments
Yes
Also next time post a comment not an answer. This aint an answer.
it wouldnt let me post a comment
i edited this if you didnt give you a notifications