1: There is no wait after red lights, using for i=1, 1000 do makes it glitchy and more. Here is a fixed version:
local red = script.Parent.red
local blue = script.Parent.blue
local open = true
while open == true do
red.Material = Enum.Material.SmoothPlastic
red.SpotLight.Brightness = 1
blue.Material = Enum.Material.Neon
blue.SpotLight.Brightness = 3
print('Blue Lights Activated')
wait(0.8)
print('Waiting Procedure')
wait(0.1)
red.Material = Enum.Material.Neon
red.SpotLight.Brightness = 3
blue.Material = Enum.Material.SmoothPlastic
blue.SpotLight.Brightness = 1
print('Red Lights Activated')
wait(0.8)
print('Waiting Procedure')
wait(0.1)
end
in this code:
* We edited how material will change. Material cannot be changed with "" and it must be used by Enum.Material.material
* We edited waiting time, 2 is a pretty slow time for a police car lights.
* We maked an new variable named "open" and this variable can be changed by an if function. This variable makes the main function works.
* We changed "for i = 1,1000 do" and instead of that, we did "while open == true do" and this script makes if open equals true, then run the script.
This is all! Don't forget to make 5 stars on this! Thanks.