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

How do I make a light flicker?

I tried but it won't work...

3 comments

0

Can we see your attempt?

0

I tried to use this: but nothing happened: script.Parent.MouseButton1Click:connect(function() 02 if game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled == false then 03 while true do 04 game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled = true 05 wait(1) 06 game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled = false

0

But that was someone else's........ it was kind of the same question....

3 answers

Try this [Add a point light in a part or something]

Wait(1)
script.Parent.PointLight.Brightness = 30

Wait(1)
script.Parent.PointLight.Brightness = 0

-- If this doesnt work put while true do and a end 

2 comments

0

This works too :D

0

:DDDDDDDDDDD

Just set the Enabled property to false to turn it off, and to true to turn it on.

By the way, in your script, you didn't have any ends to close the loop and function.

local light = script.Parent.PointLight
while true do
wait(math.random(0.8,1.8))
light.Brightness = math.random(15,30)
wait(math.random(0.8,1.8))
light.Brightness = math.random(0,5)
wait(math.random(0.8,1.8))
end

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