AnimationTrack.Looped property is not updated immediately

Reproduction Steps

1. Create an animation in the animation editor with looping turned
2. Make it several seconds long (might not be necessary)
3. Publish it
4. Run this code

local track = Animator:LoadAnimation(Animation)
print(track.Looped)
task.wait(5)
print(track.Looped)

Expected Behavior

I expect the property Looped to be true if it’s published as true

Actual Behavior

Looped take a second or two to actually update. So the code above would print false and then true

Workaround

Add boolean attributes manually instead of reading the property

Issue Area: Engine
Issue Type: Display
Impact: Low
Frequency: Constantly

4 Likes

Roblox needs to first load the animation so as to tell whether it should loop or not. Given we stream animation data there will be some latency before we can infer that. That’s why waiting gives you the correct value.

1 Like

I understand. Appreciate the explanation. I posted a feature request.

Shouldn’t this delayed change at least trigger AnimationTrack:GetPropertyChangedSignal(“Looped”)?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.