#Flickering light script only partially working.

1 messages · Page 1 of 1 (latest)

young gorge
#

I'm currently working on a script that works pretty well alone, it turns on and off the spotlight at random intervals to simulate a flickering light, however the object that is using the SpotLight which is a hanging light also has a seperate part for the bulb and it's color, so not only do I need to flicker the SpotLight I also need to flicker the brickcolor of the bulb.
Unfortunately when adding the script to change the brickcolor according to weather the SpotLight is on or off the entire light just stops flickering and it remains permenantly on.
The script is attached.

frozen kestrel
#

make a bulb for lightcolor

icy cobalt
#

u dont need to make math.random(0,1) its the same as math.random()

#

just write math.random()

hard pollen
frozen kestrel
icy cobalt
hard pollen