Question by
EmployingBeef2 · Feb 13, 2016 at 03:25 AM ·
animation script
I am confused on triggering animations by key press.
I have been very confused on how to do this. Here is the Code:
The object is "SMG2" and the animation is "SprintSMG"
function Update () { if(Input.GetKeyDown(KeyCode.LeftShift)) { GameObject.Find("SMG2").GetComponent.().Play("SprintSMG"); } }
Comment