How to make characters bounce back in kind of an arc angle?

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

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()

By using up vector you can make a diagonal push

local KB = Instance.new("Bodyvelocity")
KB.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
KB.Velocity = bv.Velocity = (Character.HumanoidRootPart.CFrame.LookVector * 60) + (Character.HumanoidRootPart.CFrame.UpVector * 60)
KB.Parent = Victim.HumanoidRootPart
1 Like