Hi,
I have this script and I want it to not only turn the light on and off but to change the brick colour. So when I press the button it turns the light on and changes the brick colour from Medium stone grey to Really red. When I click it again it turns the light off and changes the brick colour from Really red to Medium stone grey.
LP = script.Parent.Parent.SpotLight1.Light.SpotLight
btn = script.Parent.ClickDetector
function onClick()
if LP.Enabled == true then
LP.Enabled = false
else
LP.Enabled = true
end
end
btn.MouseClick:connect(onClick)
Thanks Kieran

1 comment
Thank you!