AnimationEventHandler
Attach this script to a GameObject with an Animator to receive events when the animation graph state changes.
self:GetComponent(AnimationEventHandler).StateExit:Connect(function(clip) print("AnimationClip " .. clip.name .. " finished playing") end)
Properties
OnStateEnter is called when a transition starts and the state machine starts to evaluate this state.
OnStateExit is called when a transition ends and the state machine finishes evaluating this state.
OnStateIK is called right after Animator.OnAnimatorIK().
OnStateMove is called right after Animator.OnAnimatorMove().
OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks.