function onclick() script.parent.pointlight.active = true end script.parent.ClickDetector:connect (onclick) code example
Example: lua click detection
local clickDetector = workspace.Part.ClickDetector
function onMouseClick()
print("You clicked me!")
end
clickDetector.MouseClick:connect(onMouseClick)