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

How do I make a light flicker?

Asked by 10 years ago

I tried but it won't work...

0
Can we see your attempt? M39a9am3R 3210 — 10y
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 djescott 0 — 10y
0
But that was someone else's........ it was kind of the same question.... djescott 0 — 10y

3 answers

Log in to vote
1
Answered by 10 years ago

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 
0
This works too :D TheMyrco 375 — 10y
0
:DDDDDDDDDDD KennyAtkins 0 — 10y
Ad
Log in to vote
0
Answered by
TheMyrco 375 Moderation Voter
10 years ago

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.

Log in to vote
0
Answered by
LAC44 20
10 years ago
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

Answer this question