Made a simple illustration; I hope that help you understand.

This is what I have so far and it just bounces the character up.
local knockback = Instance.new("BodyVelocity")
local x = rootPart.CFrame.LookVector * magnitude
local y = Vector3.new(0, magnitude, 0)
knockback.Parent = hitRootPart
knockback.Velocity = x * y
knockback.MaxForce = knockback.MaxForce * magnitude
wait()
knockback:Destroy()