I want to loop animation on both the client and server side, but it only loops on the client side. I looked up other similar problems and I followed the solution they had, but it wouldn’t loop on the client side. I made the looping true in the animation editor. I thought animation would be replicated for both the client and server side.
This is the code I used for the local script. It works as I expected it would, but I also tried it in the server script. The animation is not looping. I also change the player or character for the animations.
local Hold = game.ReplicatedStorage.Storage.Animations.Tools.Range["LR-M2_Hold"].Value
local Attack = game.ReplicatedStorage.Storage.Animations.Tools.Range["LR-M2_Attack"].Value
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://" .. Hold
local holdtrack = localplayer.Character:WaitForChild("Humanoid", 1000):LoadAnimation(anim)
holdtrack.Priority = Enum.AnimationPriority.Action4
local anim2 = Instance.new("Animation")
anim.AnimationId = "rbxassetid://" .. Attack
local attaktrack = localplayer.Character:WaitForChild("Humanoid", 1000):LoadAnimation(anim)
attaktrack.Priority = Enum.AnimationPriority.Action4