so I have this script
var NifeDamage = 60;
function Start () {
Throw();
}
function Throw(){
GetComponentInParent.<Rigidbody>().AddForce(transform.parent.forward * 1000);
GetComponentInParent.<Rigidbody>().useGravity = true;
GetComponentInParent.<Animation>().Play("Nife");
}
function OnCollisionEnter(collision : Collision){
Debug.Log("Hit something");
GetComponentInParent.<Animation>().Stop("Nife");
}
in theory it should stop the Nife animation when detecting a collision
but for some reason it just keeps repeating the animation over and over
the animation is set to loop but I don’t know how to keep the animation going through scripting
does anyone have a idea?