I think I might be going crazy! I have been stumped on this for over an hour and I don’t know if its my brain shutting down f rom being awake for almost 24 hours or some weird bizzare bug on Roblox’s end.
So, I’m trying to play an animation. However, no matter what I do it seems to loop no matter what. The bizzare thing is that the .Stopped event still fires when the animation finishes its first playback.
I’ve made sure that I disabled the loop property before uploading the animation to Roblox and I’ve also explicitly set the loop property to false in the script.
Here is my code snippet:
local boxGrabTrack: AnimationTrack = humanoid.Animator:LoadAnimation(boxGrabAnimation)
boxGrabTrack.Priority = Enum.AnimationPriority.Action
boxGrabTrack.Looped = false
boxGrabTrack:Play()
boxGrabTrack.Stopped:Wait() -- This event ends up firing.
boxGrabTrack:Destroy()
Yeah Roblox has always had issues with the looped and priority properties replicating properly. However, what I’m completely stumped is that I explicitly set the looped property to false when uploading the animation to Roblox’s website. This issue has never happened to me until now.
I am aware of what :GetPlayingAnimationTracks() does. But I am stopping the track already, so looping through all other animation tracks and stopping those as well does not resolve the problem (yes, I even tried that snippet).
Seems like I fixed the issue. When I uploaded it as a new animation instead of updating the already existing animation, it magically started working as intended.
This is what happened I’m guessing which lead to this issue: When I uploaded the animations to the Roblox website initially, I likely forgot to set the looped property in the animation editor to false. I’m assuming that when I repeatedly tried overwriting the same animation with it not being looped, the website didn’t want to update it.
If my suspicions are correct and I can reproduce this, I’ll probably file a bug report.