Hi,
So I have this script. It turns all the lights on and off when I click it on and off. Now I want it to randomly strobe the lights. I press the button and it does random strobe lights but not at the same time, different times to make the show effect. Then when I press the button there it all turns off. The button turns RED when on The button turns GREY when off.
Please help to make it work for this script.
local P = script.Parent.Parent
local LP1 = P.SpotLight12.Light.SpotLight
local LP2 = P.SpotLight11.Light.SpotLight
local LP3 = P.SpotLight10.Light.SpotLight
local LP4 = P.SpotLight9.Light.SpotLight
local LP5 = P.SpotLight8.Light.SpotLight
local LP6 = P.SpotLight7.Light.SpotLight
local LP7 = P.SpotLight6.Light.SpotLight
local LP8 = P.SpotLight5.Light.SpotLight
local LP9 = P.SpotLight4.Light.SpotLight
local LP10 = P.SpotLight3.Light.SpotLight
local LP11 = P.SpotLight2.Light.SpotLight
local LP12 = P.SpotLight1.Light.SpotLight
lp = {LP1, LP2, LP3, LP4, LP5, LP6, LP7, LP8, LP9, LP10, LP11, LP12}
btn = script.Parent.ClickDetector
function onClick()
for i, v in pairs(lp) do
v.Enabled = not v.Enabled
end
end
btn.MouseClick:connect(onClick)
Thanks Kieran

2 comments
Ok thanks for that. How do I change the frequency so that I make sure it does not go below the 1Hz.
It's just a note. If the
waittime is more than a second then there's not so much of a concern. If you want it to be faster than that just making a notice in the description / in a GUI prior would be enough (or not at all since few people do make considerations for epilepsy / strobing lights)