Knockback Doesn't Work

My knockback function knocks the player back the same amount every time even with different values implemented.

I want the knockback the player experiences to be based on the values implemented.

This video demonstrates how despite different values imputed the knockback effect is the same: 2021 08 09 23 34 57 - YouTube

function knockback(char, attacker, val, ntime)
	local charRoot = char:FindFirstChild("HumanoidRootPart")
	local attackRoot = attacker:FindFirstChild("HumanoidRootPart")
	local vel = Instance.new("BodyVelocity")

	vel.Velocity = attackRoot.CFrame.LookVector * val
	vel.Parent = charRoot

	Debris:AddItem(vel, ntime)
end

Why don’t you use BodyVelocity instead?

Or this.

If you look at the code you will notice that I already am using body velocity. The code you linked does the same exact thing as my code, and after testing it produces the exact same results. Thanks anyways though. I appreciate any help provided.

Ok I believe I fixed the problem. I simply replaced Debris:AddItem(item, time) with wait(time) item:Destroy(). I thank anybody who responded.