Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a knock back on damage script?

Asked by 4 years ago

I’m trying to make it so if you get hit by a sword or any weapon it will knock the player back every time you hit someone two times with a weapon and I really don’t know how I’m suppose to do this can someone help me?

2 answers

Log in to vote
0
Answered by
megukoo 877 Moderation Voter
4 years ago

You could insert a BodyVelocity into the target's HumanoidRootPart for a short while, give it a force, and delete it later.

Ad
Log in to vote
0
Answered by 4 years ago
local bv = Instance.new("BodyVelocity",Target)
bv.MaxForce = Vector3.new(25000,25000,25000)
bv.Velocity = Character.HumanoidRootPart.CFrame.lookVector * 10
game.Debris:AddItem(bv,0.3)

This is a simple Knockback script.

Answer this question