Animations working on client but not the server

I am trying to get animations to work on the server. They only half work.

The Issue is that the animations work on the client but not the server.

CLIENT IMAGE - image

SERVER IMAGE - image

I have searched this issue on the dev forum and it seems as if no one has had this issue.

Here is the code in the server that handles these animations:

EquipRemote.OnServerEvent:Connect(function(player, weapon)
	local CurrentFolder = player.Character:WaitForChild("Current")
	local WeaponClone = TPModels:FindFirstChild(weapon):Clone()
	
	for i,v in pairs(CurrentFolder:GetChildren()) do
		v:Destroy()
	end
	
	local Joint = Instance.new("Motor6D")
	Joint.Part0 = player.Character.RightHand
	Joint.Part1 = WeaponClone.PrimaryPart
	Joint.Parent = WeaponClone.PrimaryPart
	
	
	WeaponClone.Parent = CurrentFolder
	
	local Humanoid = player.Character.Humanoid
	local Animation = Humanoid:LoadAnimation(WeaponClone.Idle)
	
	Animation:Play()	
	
end)

But to load animations you need to do it in a local script, right?

I tried loading animations locally and not on the server. Sadly that did not do anything. I still have the same issue.

Just do it in a server script, I don’t think you need to load animations locally but if you want to you can send the animation to a server script through a remote event / function.

Humanoid:LoadAnimation is depreciated. Try Animator:LoadAnimation instead.

Humanoid:LoadAnimation (roblox.com)

tried it, same issue still sadly

it almost looks like you might also have multiple animations running. What priority is this animation (listed as Idle). Your script could be competing with the Animate script. It’s weird that you are seeing this on the server side only.

Try GetPlayingAnimationTracks, to see if you have things running that you aren’t supposed to be running.

Hey man! Did you ever figure this out?

Yes. Play ALL animations on the client. Playing animations on the server is very buggy for some reason…

1 Like

Thanks! Just a little scripting advice if you can. How did you play idles, walking, etc on the client?

I just called
player.Character.Animate.walk.WalkAnim.AnimationId = “rbxassetid://”
but I am running into the same issue as you.