How can i trigger a animation with a button. The animation is called reload and the button i wanna trigger it with is r
Try this:
function Update () {
if(Input.GetKeyDown("R")) {
animation.Play("animationName");
}
}
NOTE: this script is untested. By the way, please do not ask for complete scripts, but ask for specific questions on how to script this.