// im getting this error in the title with the else part what did i do wrong i try respecting the bracket like others script but this one doesn’t seem to like it.
var animator : Animator;
function Start () {
animator = GetComponent( Animator );
}
function Update () {
if (Input.GetMouseButtonDown (0))
{
shootAnimation ();
}
}
function shootAnimation ()
{
animator.SetBool( "shoot" , true);
}
else // this part
{
if (Input.GetMouseButtonUp (0))
{
animator.SetBool ( "shoot", false);
}
}
// im using the animator of unity mechanic and im trying to tell that if the player stop touching the mousebutton it will become false.(back to idle).