AnimationTrack Changed does not fire

It seems that the Changed event of AnimationTracks does not fire for changes to properties such as IsPlaying and TimePosition. I would like to use events to detect when an animationtrack starts playing, without having to loop to check if it actually is playing. Surely, I could look in the Humanoid/AnimationController to check when the track started playing, but that seems like a work-around for the default behavior of Changed firing when a property changes.

To reproduce, upload an animation, setup a rig with a Humanoid/AnimationController and an Animation with the AnimationId of your uploaded animation, and try out this in a LocalScript

local track = workspace.Dummy.Humanoid:LoadAnimation(workspace.Dummy.Animation)

track.Changed:connect(function(prop)
	print("AnimationTrack property changed:", prop)
end)

track:Play()

Here’s a test file using the default walk animation
AnimTrackBugRepro.rbxl (12.6 KB)

3 Likes

I’m not clear why you want to use Changed over AnimationPlayed or KeyframeReached. Can you elaborate on why these aren’t sufficient?

This is per humanoid and not per animation. The use case for that is the same as using Sound.Played instead of some SoundPlayed event in SoundService if we had something like that. As for AnimationTrack.Changed, property==TimePosition, I can’t think of any use cases. Here are a lot of places the AnimationTrack API is lacking though.