Animation won't loop on client side

Hi,

My intention is to make the animation run on both the server and the client and the animation should be looped, but when I run the game, the animation work on both sides, but on client, it doesn’t loop the animation.

Here’s the code:

local function playAnimationFromServer(character, animation)
	local humanoid = character:FindFirstChild("Humanoid")
	if humanoid then
		local animator = humanoid:FindFirstChild("Animator")
		if animator then
			local animationTrack = animator:LoadAnimation(animation)
			animationTrack.Looped = true
			animationTrack:Play()
			return animationTrack
		end
	end
end
1 Like
1 Like