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.
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.
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.