Animations do not replicate despite being played on the server

Hey everyone, so I started having issues with animation replication since it was announced that using :LoadAnimation() directly on Humanoids and AnimationControllers will be deprecated. Everything was working perfectly fine before that.

Basically I have a train that is physics-based and it has animated doors. The player who’s driving the train has the network ownership of all the train parts. However, door animations are visible only on the driver’s side despite the animation being played on the server. Animation’s priority is set to Action, I create the Animator instance on the server before the train spawns and :LoadAnimation() is called on the Animator instance.

Code on the server for the animation playing:

local station = Workspace.Stations[nextStn.Value]
local side = (destination.Value == "Paral·lel" and station.StationPart2.Side) or station.StationPart1.Side
local anim = TRAIN.Animations.DoorsAnim

for _, coach in pairs(TRAIN.Animations:GetChildren()) do
	if coach:IsA("Model") then
		for _, animController in pairs(coach[side.Value]:GetDescendants()) do
			if animController:IsA("AnimationController") then
				local track = animController:WaitForChild("Animator"):LoadAnimation(anim)
				track:Play()
			end
		end
	end
end

It becomes visible to everyone only once the server has network ownership of the parts. However, I don’t want the server to be the network owner since there’s gonna be many trains and that would cause too much stress for the server taking care of all physics simulation.

I know that @MetroCammell and @FilteredStudio (sorry for the tags) experienced the same thing and is outlined in this and this post.

Has anyone else experienced it too? Do you have a solution to this?
Any answers are appreciated! Let me know if you need any more info. :slightly_smiling_face:

2 Likes

I would recommend either making the doors tween instead, if not then I would assume firing from the client to the server should make them work?

I have thought of making them tween but that overcomplicates things so much. The animations don’t replicate when played on the client or the server.

It wouldnt work on the client, unless you make the server fireallclients, however I would just do a tween to be honest.

I might just end up writing my own animation module based on the animation key frames. Thanks anyway

This is still a present day issue. I have an Animator being created server side into my pet, which I’ve checked that it duplicated on all clients before playing the Pet’s animation, yet it’s still not working for me.

@BPilot253 Are you able to change this to a bug report instead?

Other people encountering the same issue w/ Animator:

1 Like

I would definitely love to file a bug report but unfortunately I am not a Regular…

1 Like