Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Flickering light script broken?


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!

1 comment

0

Well, just put another wait(.3) after script.Parent.PointLight.Enabled = true

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.