Apparently this only works once. Im not sure why
enabled = true
function onTouched(hit)
local door1=script.Parent.Parent.Door1
local door2=script.Parent.Parent.Door2
h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
if not enabled then return end
enabled = false
door1.CanCollide=false
door2.CanCollide=false
for i=1,10 do
wait()
door1.Transparency=door1.Transparency+.1
door2.Transparency=door2.Transparency+.1
end
wait(4)
for i=1,20 do
wait()
door1.Transparency=door1.Transparency-.1
door2.Transparency=door2.Transparency-.1
end
door1.CanCollide=true
door2.CanCollide=true
enabled = true
end
end
connection = script.Parent.Touched:connect(onTouched)

3 comments
Does it work?
Try it again
Fixed it.