Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a knock back on damage script?

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

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.