AnimationTrack.Looped Does Not Replicate

I can confirm this issue is still occurring.

Repro Code:

--[[
Repro Instructions:
 - Create a R15 rig 
 - Create a Script and parent it to the rig
 - Add this code to the script
 - Play test: Compare results on the client and the server
]]--

local newAnimation = Instance.new("Animation")
newAnimation.AnimationId = "http://www.roblox.com/asset/?id=507770239" --Default Roblox wave animation. Looped is set to true initially.

local newAnimator = Instance.new("Animator")
local humanoid = script.Parent.Humanoid
newAnimator.Parent = humanoid

local animationTrack = newAnimator:LoadAnimation(newAnimation)
animationTrack.Looped = false --Looped is set to false on the server

-- Expected behavior: Wave animation plays, stops, then about five seconds later plays again.
-- Actual behavior on client: Wave animation loops, resetting when AnimationTrack:Play() is called. Calling AnimationTrack:Stop() doesn't stop the animation on the client.
-- Actual behavior on server: Expected behavior.
while true do
	animationTrack:Play()
	print("Animation played!")
	animationTrack.Stopped:Wait()
	print("AnimationTrack.Stopped on server!")
	--Using AnimationTrack:Stop() as a work around doesn't work:
	animationTrack:Stop() print("Tried to force animation to stop with AnimationTrack:Stop()!") --This code doesn't stop the animation on the client.
	wait(5)
end

Repro File:
AnimationTrack.Looped not replicating repro.rbxl (33.2 KB)


While this bug isn’t very hard to work around (animations can be reuploaded), I think this should at least be mentioned in the AnimationTrack.Looped page of the wiki to inform developers.

5 Likes

Coming up on almost 3 years since this has been reported, and it is still an issue.

2 Likes

LOL never realized it was a bug. Ive tried using .Looped for well over a year, failing, and thinking I was doing something wrong. Turns out it’s just broken.
Roblox, how about you fix this bug after 3 years? :heart_eyes:

7 Likes

Please fix this. Right now I have to create a system, whenever a looped animation gets turned on it has to send a remote signal to all clients to play an animation for that certain rig.

1 Like

Yup, I’m having the same issue still. Works fine when viewing from server side, but clients are looping.

2 Likes

the issue is still here… this is strange

1 Like

The bug is still occurring. I’m so disappointed rn :frowning:

1 Like

Ran into this today, threw me for a loop (hahah :drum:) until I eventually found this thread. My serverside NPCs were animating properly on the server, but not the client.

Kinda silly that this doesn’t replicate. It is not intuitive at all. This is very frustrating when you’re using animations you didn’t create (Roblox emotes namely) - as you can’t easily loop them without some weird and tedious workarounds.

4 Likes

It’s still happening… It’s been three years, how is this still not solved? It’s incredibly annoying. Has this even been looked into?

2 Likes

Adding on to this, could it at the very least be marked on the documentation that AnimationTrack.Looped doesn’t replicate? This has been happening for 3 years, it seems like at this point it should just be made official.

4 Likes

Damn. Didn’t think I would be stumped by a 3 year old bug :unamused: spent the last few hours trying to figure out why my animations weren’t looping. At least I’ve got closure as to why they weren’t :rofl:

2 Likes

This is still a problem. Are there any updates on this? It’s been nearly 4 years… this is an incredibly inconvenient bug that makes working with humanoids & animations on the server-side quite a headache.

3 Likes

For the ones that are in need of this property and don’t know what to do, here are some work arounds:

  • Work around 1:
    while true do
       AnimationTrack:Play()
       AnimationTrack.Stopped:Wait()
    end
    
  • Work around 2:
    Go directly to the animation editor and set the animation to loop, then just go to the game and call Play (the animation will literally just loop).
2 Likes

From a user perspective, the engineering work required to fix/add a feature is more often than not very deceiving. Things you expect to take a large workload actually don’t, and things that seem easy to fix might be caused by a very deep engine implementation that can’t be easily changed.

For bug reports, it’s best to argue in terms of the impact it has on you as a developer to have it resolved. It’s not really constructive to talk about “effort to fix”, because we simply can’t reason about it, nobody here actually knows.

It’s definitely true that when bugs have a good(!) workaround, there is less of an incentive to resolve the issue if there are other pressing matters going on. But I don’t think either of those workarounds is particularly satisfying. The second one seems good but it inhibits you when you need the same animation both looped and non-looped.

3 Likes

Animation replication is different from all other replication IIRC. When you play an animation from the server multiple times, you actually get separate tracks each with their own animation object on the client.

As above, it’s not always as straight forward as you think, and it’s pointless to argue about engine internals since nobody knows. Focus on impact the issue has on you if you want it resolved more quickly.

4 Likes

This bug prevents me from stopping Roblox emote animations from looping when disabling the Looped property on the server.

2022 :thinking: Just encountered this bug. Can we get an update on the ticket progress @CodeWriter ?

3 Likes

We are working on improvements to the animation replication system that should resolve this issue. Unfortunately, those improvements are taking longer than expected as we don’t want to break any existing functionality. We are continuing to work on this, though and we hope to release it as soon as it is working well.

22 Likes

What sort of timeframe are we looking at? It’s still causing some significant problems and the workarounds at not pretty.

At the very least, a way to get loaded animations in an Animator without using AnimationPlayed would be much appriciated.

2 Likes

Not sure if this helps.

The first video. I had the priority of the animation set to “Idle” (for the idle crawl animation)
https://gyazo.com/562fb0cd01366fe4b20b0fbe10e302e2.mp4

The second video. I had the priority of the animation set to “Core”.
https://gyazo.com/653783cb11065971c85cf8a6a9b070d8.mp4

Core priority animations seem to replicate properly.
For anyone else if the animation doesn’t have to be a higher priority this seems to be the solutuion


Animator_Bug.rbxl (34.6 KB)
Still an on-going issue causing replication issues for other clients.

4 Likes