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 9 years ago
1while true do
2    script.Parent.PointLight.Enabled = false
3    wait(0.3)
4    script.Parent.PointLight.Enabled = true
5end

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 — 9y

1 answer

Log in to vote
0
Answered by
iAviate 20
9 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().

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

Answer this question