Animation lag when playing in client

Hey guys! I got this issue why my animation skip , lag alot when I’am >300 ping

here’s my code

if gameProccesedEvent then return end
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		local combo,status = katanaRemote:InvokeServer("Attack",{})
		if combo  then
			local Animation = 	AnimationServices.playAnimation(get("Humanoid"),"Katana","Slash"..combo)
			if status == "canAttack" and Animation then
				Animation:Play()
				
				local Velocity = Instance.new("BodyVelocity")
				Velocity.MaxForce = Vector3.new(1,0,1) * 100000
				Velocity.Parent = get("HumanoidRootPart")
				local sec 
				
				if combo == 1 then
					Animation:AdjustSpeed(.6)
					Velocity.Velocity = get("HumanoidRootPart").CFrame.LookVector * 40
					Velocity.P = 1000
					sec = .5
				else
					Velocity.Velocity = get("HumanoidRootPart").CFrame.LookVector * speed
					sec = .2
				end
				
				delay(sec,function()
					Velocity:Destroy()
				end)
				

this is the lag:

my pov:

1 Like

Load the animation before clicking anything (that means when you equip the tool, if the animatin isn’t loaded already, add checks.), so when you are to start attacking, you only play the animation instead of loading it.

look at my pov its smooth , i mean the server network make the animation wrost

btw how to do that? can you tell me ?