How do I make a loop for lights so every second they turn on, then off? Please help!
it comes up with this
SpotLight is not a valid member of Part
How do I make a loop for lights so every second they turn on, then off? Please help!
it comes up with this
SpotLight is not a valid member of Part
you would use a while loop:
local Timetowait = 1
while wait(Timetowait) do
if script.Parent.SpotLight.Enabled == true then
script.Parent.SpotLight.Enabled = false
else
script.Parent.SpotLight.Enabled = true
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You could use script.Parent.SpotLight.Enabled = not script.Parent.SpotLight.Enabled
Umm ok?