I'm trying to make double doors and when I click the switch, nothing happens. Please help?
ldoor=script.Parent.Parent.Ldoor
rdoor=script.Parent.Parent.Rdoor
debounce = true
function move()
if debouce == true then
debounce = false
for i=1,14 do
ldoor.CFrame=CFrame.new(ldoor.CFrame.x + .5,ldoor.CFrame.y,ldoor.CFrame.z)
rdoor.CFrame=CFrame.new(rdoor.CFrame.x - .5,rdoor.CFrame.y,ldoor.CFrame.z)
wait()
end
wait(1.5)
for i=1,14 do
ldoor.CFrame=CFrame.new(ldoor.CFrame.x - .5,ldoor.CFrame.y,ldoor.CFrame.z)
rdoor.CFrame=CFrame.new(rdoor.CFrame.x + .5,rdoor.CFrame.y,rdoor.CFrame.z)
wait()
end
debounce=true
end
end
script.Parent.ClickDetector.MouseClick:connect(move)

2 comments
Is there an error in the output?
Suprisingly none.