// OnStateExit is called when a transition ends and the state machine finishes evaluating this state override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { animator.SetFloat("ArmsLayerWeight", 1f); animator.SetLayerWeight(animator.GetLayerIndex("Arms"), 1f); locomotion.StopRolling(); }