I need help with a script for police lights (I do not need a toggle button)
This i what the light group is. On = true and Pattern = 1
This is the script I used
Mainveh = script.Parent
while true do
wait(0)
if script.Parent.on.Value == true then
Mainveh["Blue lights1"].Transparency = 0 -- Names of lights
Mainveh["Blue lights2"].Transparency = 0
Mainveh["Blue lights3"].Transparency = 0
Mainveh["Blue lights4"].Transparency = 0
Mainveh["Red light1"].Transparency = 1
Mainveh["Red light2"].Transparency = 1
Mainveh["Red light3"].Transparency = 1
wait(0.12)
Mainveh["Blue lights1"].Transparency = 1
Mainveh["Blue lights2"].Transparency = 1
Mainveh["Blue lights3"].Transparency = 1
Mainveh["Blue lights4"].Transparency = 1
Mainveh["Red light1"].Transparency = 0
Mainveh["Red light2"].Transparency = 0
Mainveh["Red light3"].Transparency = 0
wait(0.12)
Mainveh["Blue lights1"].Transparency = 0
Mainveh["Blue lights2"].Transparency = 0
Mainveh["Blue lights3"].Transparency = 0
Mainveh["Blue lights4"].Transparency = 0
Mainveh["Red light1"].Transparency = 1
Mainveh["Red light2"].Transparency = 1
Mainveh["Red light3"].Transparency = 1
wait(0.12)
Mainveh["Blue lights1"].Transparency = 1
Mainveh["Blue lights2"].Transparency = 1
Mainveh["Blue lights3"].Transparency = 1
Mainveh["Blue lights4"].Transparency = 1
Mainveh["Red light1"].Transparency = 0
Mainveh["Red light2"].Transparency = 0
Mainveh["Red light3"].Transparency = 0
else
Mainveh["Blue lights1"].Transparency = 1
Mainveh["Blue lights2"].Transparency = 1
Mainveh["Blue lights3"].Transparency = 1
Mainveh["Blue lights4"].Transparency = 1
Mainveh["Red light1"].Transparency = 1
Mainveh["Red light2"].Transparency = 1
Mainveh["Red light3"].Transparency = 1
end
end
If you need more info I can give it to you