I use the script below in a button to open a two-door elevator, which the doors move in the same direction. It works as intended in test servers (which seems to be a theme that runs through my questions), but in an active server, it fails to operate. The Click Detector noted is in the correct placement, and there is nothing else for the script to do. Any reason why it may be acting up?
-- Door variables local Button = script.Parent local Door1 = script.Parent.Parent.Door1 local Door2 = script.Parent.Parent.Door2 function onClicked() wait(3) for e = 2,25 do Door1.CFrame = CFrame.new(Door1.CFrame.x,Door1.CFrame.y,Door1.CFrame.z - 0.15) Door2.CFrame = CFrame.new(Door2.CFrame.x,Door2.CFrame.y,Door2.CFrame.z - 0.3) wait(.0001) end wait(5) for e = 2,25 do Door1.CFrame = CFrame.new(Door1.CFrame.x,Door1.CFrame.y,Door1.CFrame.z + 0.15) Door2.CFrame = CFrame.new(Door2.CFrame.x,Door2.CFrame.y,Door2.CFrame.z + 0.3) wait(.0001) end end script.Parent.ClickDetector.MouseClick:connect(onClicked)