What is the best way to create knockback?

So I want my answer heard to the point: What is the best way to create knockback?

I’ve played a lot of fighting games on Roblox and I found one thing some of them have in common: Knockback. I searched on youtube for more information about it but to no avail. I’ve made this post about what tools do you use to create knockback and how? (I’m not saying that you make it for me)

Plz do reply! It warms my heart to find an answer.

1 Like

Hello, I would recommend to use BodyVelocity.
https://www.roblox.com/games/6000685909/Fighting-system
My game, it uses BodyVelocity for knockback when player does heavy punch.

4 Likes

I don’t think he may know how to use it due to the fact you need both the attacked and attacker’s position to create the knockback, it also doesn’t have enough information to tell you what to do with the body velocity. Also the test dummy doesn’t respawn so you have to rejoin again as soon it dies.

Also i suggest atleast adding some example of a code that would be useful.

Well, he asked what’s the best way to do this, nothing related to code, and dummy isn’t supposed get knockback. You need a second player to test it.

Actually, it works. Just the first fist combo hit.

This is not my code, I found it here.

local Speed = 40
local Force = 80000
local Character  = --character you want to knockback

local TotalForce = Force

local KnockBack = Instance.new("BodyVelocity")
KnockBack.Parent = part.Parent:FindFirstChild("HumanoidRootPart")--part is the target of the knockback/ the opponent

KnockBack.MaxForce = Vector3.new(TotalForce,TotalForce,TotalForce)
KnockBack.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.LookVector * Speed -- based on the direction YOUR character is facing.
8 Likes