Guys I am making a FPS game in Unity 3D and I cant get the light to work with the muzzle flash. The muzzle flash Works fine, but the lights don’t. HERE IS THE SCRIPT IM USING:
#pragma strict
var muzzleFlash : ParticleEmitter;
var lightOne : GameObject;
var lightTwo : GameObject;
function Start () {
Screen.showCursor = false;
muzzleFlash.emit = false;
lightOne.SetActiveRecursively(false);
lightTwo.SetActiveRecursively(false);
}
function Update () {
if(Input.GetButtonDown("Fire1"))
muzzleFlash.emit = true;
lightOne.SetActiveRecursively(true);
lightTwo.SetActiveRecursively(true);
if(Input.GetButtonUp("Fire1"))
muzzleFlash.emit = false;
lightOne.SetActiveRecursively(false);
lightTwo.SetActiveRecursively(false);
}