function Update () {
if (Input.GetButtonDown("Attack")) {
GetComponent.().Play("SwordSlash");
}
}
This code is attached to my weapon which is in turn attached to my FirstPersonCharacter when i press p, (the button assigned to 'Attack' in input) nothing happens? On my weapon i also have an a animation component that has 'SwordSlash' set as the animation.
With this information, is it possible that one of you could tell me what the problem is with my script?
↧