I’ve spent the last 2-3 days trying to make knockback and I’m at a point where I’m wondering if making smooth knockback is even possible? Because I’ve tried everything I found online and I always end up with laggy results for both clients or smooth for one client and laggy for the other. I’ve tried doing knockback on the server, the attacker’s client, the hit receivers client, I’ve tried body velocity, tweening, linear velocity and setting network owner.
This is currently where my knockback is at and is probably the smoothest I can get it, but still quite laggy
I’ve seen games with good knockback so I know it’s possible to make this a lot better, but all the basics I’ve tried haven’t seemed to work so maybe someone else with experience with this could help?
Also here’s the code for the knockback
--Linear Velocity
local Distance = 50
local Height = 20
local Att = Instance.new("Attachment")
Att.Parent = Target.HumanoidRootPart
local LV = Instance.new("LinearVelocity")
LV.MaxForce = 500000
LV.Attachment0 = Att
LV.VectorVelocity = (PlayerLookVec * Distance) + Vector3.new(0,Height,0)
LV.Parent = Target.HumanoidRootPart
task.wait(0.3)
--bring them forward for that bouncing off the wall effect
LV.VectorVelocity = (PlayerLookVec * -30) + Vector3.new(0,0,0)
game.Debris:AddItem(LV,0.1)