Hey Guys,
I’m fairly new at scripting and I have this small script.
var flickerSpeed : float = 0.07;
var LightChild : Light;
private var randomizer : int = 0;
while (true) {
if (randomizer == 0) {
light.enabled = true;
LightChild.enabled = true;
}
else light.enabled = false;
LightChild.enabled = false;
randomizer = Random.Range (0, 1.1);
yield WaitForSeconds (flickerSpeed);
}
All I want it to do is have the child light turn off when the parent light that the script’s attached to turns off. The effect I am currently getting is the child light is just turning off permanently.