Animation is constantly looping no matter what

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()

1 Like

where the animation stop you could put

local anims = humanoid:GetPlayingAnimationTracks()
for _,v in pairs(anims) do
	v:Stop()
v:Destroy()
end						

If you’re going to reply to a post, please read it first. Your reply is very unhelpful to the poster.

EDIT: Thank you for considering my words.

1 Like

I’m already stopping and destroying the animation track.

as far as I know changing the looped property through a script might not replicate to the client
I think changing the priority has the same issue too

Worked for me. Thank you!
where the animation stop you could put

local anims = humanoid:GetPlayingAnimationTracks()
for _,v in pairs(anims) do
	v:Stop()
v:Destroy()
end						
2 Likes

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.

this gets all non-default player animations that are playing and stops and removes them

Hi. As I stated previously, please read someones post before you reply! :slight_smile:

1 Like

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.

5 Likes

this version is deprecated and no more really supported i need a better way