Hi there i am wandering if someone could please let me know how to insert the yeild.WaitForSeconds(5); into this script it has to be after the HealthControl.LIVES-=1; so that i have enough time to play an animation
private var dead = false;
function OnControllerColliderHit(hit : ControllerColliderHit) { if(hit.gameObject.tag == "fallout") { dead = true;
HealthControl.LIVES -=1;
}
}
function LateUpdate() { if(dead)
{
transform.position = Vector3(69.05988,0.8250099,0.01707077);
dead = false;
}
}