Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Flickering light script broken?

Asked by 8 years ago

while true do script.Parent.PointLight.Enabled = false wait(0.3) script.Parent.PointLight.Enabled = true end

It turns the PointLight off, but it doesn't comply to turn back on to form a flicker. Sorry for asking such a simple question, I just started :D

Thank you!

0
Well, just put another wait(.3) after script.Parent.PointLight.Enabled = true theCJarmy7 1293 — 8y

1 answer

Log in to vote
0
Answered by
iAviate 20
8 years ago

There's no delay between when the light is on and when the light is off, so it will always appear off.

Just add another wait().

while true do
    script.Parent.PointLight.Enabled = false 
    wait(0.3) -- Waits 0.3 seconds before turning back on
    script.Parent.PointLight.Enabled = true
    wait(0.3)  -- Waits 0.3 seconds before turning off
end
Ad

Answer this question