Animations stop playing for other clients in-game

This has been an issue for a while now. I’ve even seen this issue in some other games as well. I’ve also seen a post about a very similar issue in February 2021. In-game, at seemingly random moments, all player animations just stop playing, then, after a few seconds, they start playing again.

Example in-game >>> https://gyazo.com/9cfc862eb37cd713d28eb3072382582a

Link to other devfourm post >>> Character animations randomly stop working on other clients

I use 2 module scripts and 1 local script. One to store the IDs, which is in ReplicatedStorage, and another to load them, which is in the StarterPack. The Local script is located in a tool within StarterPack; it’s used to play the animation.

-- Module in ReplicatedStorage

local Animations = {}
Animations.GetIDs = {
	["Anims"] = {
		["Attack"] = 8268427144;
	};
}

-- Module in the StarterPack

local Animation_Module = require(game:GetService("ReplicatedStorage"):WaitForChild("modules"):WaitForChild("Animations"))

local saber_Anims = {}
local get_Anims = {
	Attack1= Animation_Module.GetIDs["Anims"]["Attack"];
}

local function createAnimation(char, ID)
	local humanoid = char:WaitForChild("Humanoid")
	
	if humanoid then
		local anim = Instance.new("Animation")
		anim.AnimationId = "rbxassetid://"..ID
		
		local load_Anim = humanoid:WaitForChild("Animator"):LoadAnimation(anim)
		
		return load_Anim
	end
end

function saber_Anims:SetAnimations(char)
	local all_Anims = {
		ATTACK= createAnimation(char, get_Anims["Attack1"]);
}
end

----- Local Script in tool

local Settings = require(localPlayer.Backpack:WaitForChild("Settings"))

local Players= game:GetService("Players")
local LocalPlayer= Players.LocalPlayer
local Char= LocalPlayer.Character

local Attack_Animations= {
	Animations = Settings:SetAnimations(Char)
}

Attack_Animations.Animations["ATTACK"]:Play()