So basically, as said from the title, I’m making knockback. But for some reason, it is SO choppy, I tried putting the body velocity on client side but it didnt make any difference.
Video:
https://gyazo.com/187dd5cb094b0a07eccbbdd70a30a20c
Code:
spawn(function()
if Velocity then
local hitvel = Instance.new("BodyVelocity",hitc.HumanoidRootPart)
hitvel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
hitvel.Velocity = Velocity
spawn(function()
wait(HitTime)
hitvel:Destroy()
end)
hitc.HumanoidRootPart.Touched:Connect(function(touch)
if touch:IsDescendantOf(hitc) or touch:IsDescendantOf(c) or touch:IsDescendantOf(workspace.ServerEffects) then return end
if touch.Name ~= "Base" or touch.Name ~= "Hitbox" then
hitvel:Destroy()
end
end)
end
end)