This worked fine previously. I just duplicated the door and moved it a bit. And now, it doesn't work anymore. It is supposed to remove the click function of a door so it is not openable anymore What did I do that broke it?
function onClicked() script.Parent.Parent.Lock2.SurfaceGui.TextBox.Visible = false script.Parent.Parent.Lock2.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Unlock2.SurfaceGui.TextBox.Visible = true script.Parent.Parent.Unlock2.ClickDetector.MaxActivationDistance = 8 script.Parent.Parent.Light.BrickColor = BrickColor.new("Bright red") script.Parent.Parent.Union.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Union2.ClickDetector.MaxActivationDistance = 0 end script.Parent.ClickDetector.MouseClick:connect(onClicked)