Wait for an animation to end?

Anybody know if you can wait for an animation to end? I want to make a never ending animation but I want to wait for the animation to finish each time it loops.

You should just be able to set it to loop.
https://developer.roblox.com/en-us/api-reference/property/AnimationTrack/Looped

1 Like

Sorry I didn’t mention this, I need to wait for another animation to end first aswell. So as I will keep that in mind, I still need to wait for an animation to end.

and

so you can do

if AnimationTrack1.IsPlaying then
AnimationTrack1.Stopped:Wait() -- you can wait or just break/return
end
if AnimationTrack2..IsPlaying then
AnimationTrack2.DidLoop:Wait()
end
-- Do stuff
3 Likes
if AnimationTrack1.IsPlaying then
AnimationTrack1:Wait() -- you can wait or just break/return
end

This would just error, Wait isn’t a valid method of animation track instances.

AnimationTrack1.Stopped:Wait()

You can use the ‘Stopped’ event/signal to detect when a playing animation track ends (stops).
https://developer.roblox.com/en-us/api-reference/event/AnimationTrack/Stopped

2 Likes

My bad I wrote it correctly the first time but I guess copy & paste messed me up