Script Purpose: To make a light activate from a switch. Script: local BathLightCD = script.Parent.ClickDetector
BathLightCD.MouseClick:Connect(function(Clicked)
game.Workspace.BathroomLight.Light.PointLight.Brightness = 10
if BathLightCD.RightMouseClick:Connect(function(Clicked) do
game.Workspace.BathroomLight.Light.PointLight.Brightness = 0
end
end)
Notes: The point is it's talking about using ' then ' just when I do it wants me to use an identifier which I don't know what that is. Please help.

2 comments
local BathLightCD = script.Parent.ClickDetector BathLightCD.MouseClick:Connect(function(Clicked) game.Workspace.BathroomLight.Light.PointLight.Brightness = 10 if BathLightCD.RightMouseClick:Connect(function(Clicked) do game.Workspace.BathroomLight.Light.PointLight.Brightness = 0 end end)
Don't forget to accept the answer if it helped you so we can both earn some reputation points.