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

Scripts for flickering lights?

Asked by 9 years ago

I'm curious on how to make a normal light object flicker randomly. I'm a new scripter and trying to understand this.

0
Add a part and insert a point light into the brick. Change things like color and etc. After, insert a script and copy the code I made and paste it into the script. EzraNehemiah_TF2 3552 — 9y
0
Ohh I used a different light... Thanks bro! Means a lot mechasaultfreak2 10 — 9y
0
Just replace PointLight in the code with SpotLight if you wanted the other light. Also, click "Accept Answer" next to my answer if it helped. EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Use loops so it goes on forever. Then just change the light.enabled from true to false.

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

Make sure the script is in a brick with a light in it. If it doesn't work check to see if the light is named "PointLight".


Hope this helps.

0
It helped quite a bit why thank you lol. But i'm confused on how to make it work now... @LordDragonZord mechasaultfreak2 10 — 9y
Ad

Answer this question