Animation.Looped not being read correctly

This is a limitation of animation properties. There is a delay between loading the animation and being able to depend on things like priority and looped.

The delay used to be strictly less than 1 second for me. Then it creeped up to 2 seconds… then 5. I gave up. I needed priority, and i couldn’t wait 5 seconds every time i loaded an animation.

That delay is longer the first time an animation is used in game. No matter what the delay was, it was only ever incorrect for the first load.

There is a workaround. Add a Looped or Priority property to the Animation object. That value will be accurate immediately.

1 Like

I believe by default Animations have their looping disabled?

As well, when you taunt, does the print statement for looping being true or false come up?

It will always print as if the animation is not looping.

Ok I believe it’s because every animation has their looping set to being disabled. I don’t believe you put looping is true anywhere in your code so this may be why?

The looped property should be set by default if using a looping animation. This is what happens on mine as well.

By default looping is false

(30000000)

It seems like this is the issue, I added a huge delay (6s) before checking if it loops or not, and it works correctly. I don’t quite understand your workaround, could you explain it differently?

That’s not true riddle

image

Oh ok my mistake sorry
…………………

In the properties window, scroll to the bottom of the animation object. There, you can add whatever property (aka attribute) you want, then retrieve it with object:GetAttribute("property ")

You can add attributes to multiple objects at the same time, making it a relatively painless bypass

Could it also work if I use a BoolValue instead? I am inexperienced with attribites, I’ve only ever used them once. I also intend for the animations to be able to change.

BoolValue will work fine. GetAttribute has a perk of not generating an error if the attribute is missing (as opposed to a missing BoolValue).

Alright, thank you so much, I’ve been having this problem for such a long time!

Also @riddleminecart thanks for trying, I know you didn’t get the solution but I could tell you really wanted to help and that’s very generous!

1 Like

I hope this works out!

Something to watch for in the update logs… I got confirmation of this behavior from Roblox staff months ago (when it was still 1 second). I proposed that they should add a .Loaded event to animations to identify when the properties are fully populated. They seemed agreeable to this solution. I would go back to using .Priority in a heartbeat. Less room for human error!

It did work out perfectly fine, I already implemented it and it works exactly how I had imagined! Thanks, again!

1 Like