How can I detect if a animation is finished playing?
COMMUNITY QUESTION
How to detect when a animation is finished playing?
3 answers
Or to add on the above answer, you can wait until it is done playing in the same block of code.
local animationTrack = humanoid:LoadAnimation(animationInstance)
animationTrack:Play()
wait(animationTrack.Length)
--finished playing
repeat wait() until not animationTrack.IsPlaying
If you have the animation track stored in a variable, you can use its Stopped event.
myAnimTrack.Stopped:Connect(function()
-- do things
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
print(AnimationTrack.Length)