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: