so i try to make a knockback inspired of the strongest battlegrounds, its seems that the knockback on that game goes first on the enemy and the attacker follows that direction tho, so i try to replicated, but its a little bit laggy when do it, even more when you first spawn in.
here the script of what i did:
local Force = 100000
local TotalForce = Force
local KnockBack = Instance.new("BodyVelocity")
KnockBack.Parent = enemy:FindFirstChild("HumanoidRootPart")
KnockBack.MaxForce = Vector3.new(TotalForce,TotalForce,TotalForce)
KnockBack.Velocity = player.Character:FindFirstChild("HumanoidRootPart").CFrame.LookVector * velf
local KnockBack2 = Instance.new("BodyVelocity")
KnockBack2.Parent = player.Character:FindFirstChild("HumanoidRootPart")
KnockBack2.MaxForce = Vector3.new(TotalForce,TotalForce,TotalForce)
KnockBack2.Velocity = player.Character:FindFirstChild("HumanoidRootPart").CFrame.LookVector * velf
game.Debris:AddItem(KnockBack, veltime)
game.Debris:AddItem(KnockBack2, veltime)
(btw “veltime” and “velf” are arguments, that sets the numbers, so dont worry about them).
and a clip from the strongest battlegrounds of what im trying to replicated: