New players do not see old animations?

I play long looping animations on my characters when they spawn. Any characters created after a client joins will not have their animation played for that client.

I think this is a bug.

I’m assuming Animations get replicated on AnimationTrack:Play(), and I have tried making them shorter/non-looping and replaying on final keyframe. Unfortunately, this results in a “flicker” as the arms go back down to the sides.

3 Likes

Had the same problem with a looped animation played from the server.

My solution was to have the last keyframe named End, then have this script:

[code]–[[

@Author As8D

@Description
	Code for playing a looped animation from the server.
	Uses a less than ideal way to have clients know that
	the animation is playing.

@Modified 19/10/2015

–]]

function waitForChild(instance, name, rec)
if not instance:FindFirstChild(name, rec == true) then
repeat wait() until instance:FindFirstChild(name, rec == true)
end
return instance:FindFirstChild(name, rec == true)
end

function waitForProperty(instance, name)
if not instance[name] then
repeat wait() until instance[name]
end
return instance[name]
end

local dummy = waitForProperty(script, “Parent”)
local hum = waitForChild(dummy, “Humanoid”)


local animID = “rbxassetid://ID” – add your animation asset ID here
local speed = 1 – add a custom speed here, 1 = 1x normal speed = 100%


game:service(“ContentProvider”):Preload(animID)

local animator = Instance.new(“Animator”, hum)
local animobj = Instance.new(“Animation”)
animobj.AnimationId = animID
animobj.Parent = animator
local track = animator:LoadAnimation(animobj)

track:Play(nil, nil, speed or 1)
track.KeyframeReached:connect(function(name)
if name == “End” then
track:AdjustSpeed(0.05) – slowing down for less jitter
wait(0.1) – 0.1 second delay between animation running
track:AdjustSpeed(speed or 1)
track:Play(0, nil, speed or 1)
end
end)[/code]

Though to fix the flicker, you could try make the end keyframe the same as the starting keyframe - but yeah, it’s pretty annoying and most likely a bug not being able to have looped animations play for new players in a server.

1 Like