Hey I am making a horror game and I need this hammer to swing. I have this script and fixed a lot of problems with it. I get an error that says the animation state could not be played because it couldn't be found! Here is the script.
var animation_bool : boolean ;
function Update()
{
if (animation_bool == true)
{
GetComponent.().Play("HammerHit");
}
if (Input.GetMouseButtonDown(0))
{
animation_bool = true;
}
}
↧