I’m making a puzzle game with some fps elements so I made a gun recoil animation, and I think I made the script correctly. I parented it to the M9 and and added audio with the animation, but now it says there is no Input. So set the input to mouse 1 (I think that’s left click) and it still gives me this error any ideas?
Script is here
function Update () {
if(Input.GetButtonDown(“fire1”)){
var gunsound : AudioSource = GetComponent.();
gunsound.Play();
GetComponent.().Play(“GunShot”);
}
}