Hi, I made script for light switch but which removing clickdetector from part but how can I restore this clickdetector in other part?
This is this script
script.Parent.ClickDetector.MouseClick:Connect (function(plr)
script.Parent.Parent.ON.Transparency=1
script.Parent.Parent.OFF.Transparency=0
script.Parent.ClickDetector:remove()
end)

5 comments
maybe add a wait function then restore it?
But how can I restore it?
maybe use vector3.new() too tp a invisible block with click detector(hitbox) and when u click it tp away so u cant click it but it tp the other invisible block to the other switch, i explain if confuse
I tried it but I'm looking for something better
u can turn the clicking range to 0