Hey guys,
I’ve looked around on previous answers and even adjusted the code, it still didn’t work so i went back to the way i wrote it.
It seems to be self explanatory so i don’t understand why the script isn’t working… Also, i have the animation on the same gameObject.
I tried to set it as… When left click is pressed down, activate animation. (every time its pressed the animation should play).
This is my code.
using UnityEngine;
using System.Collections;
public class axeAnimation : MonoBehaviour {
// Update is called once per frame
void Update () {
if (Input.GetButtonDown("Fire1"))
{
animation.Play();
}
}
}