So i'm working on a Punch script, and I wanted to script it that if a Player is punched, the Player goes flying backwards with force. How would I do that?
✓ ANSWER ACCEPTED
How do I make a Player fling backwards?
2 answers
✓ Accepted answer
Call the flyback function, and provide the character that you want to make fly backwards Variables can be adjusted for higher/longer flight, and so it flings backwards harder.
function flyback(char)
local back=Instance.new("BodyForce",char.Torso)
local up=Instance.new("BodyForce",char.Torso)
up.Force=Vector3.new(0,5000,0)
back.Force=char.Torso.CFrame.lookVector*-3000
wait(1)
back:Destroy()
up:Destroy()
print("Function ran")
end
wait(2)
flyback(script.Parent)
print("Called function")
Use a BodyForce. To see more, click here.
2 comments
0
So I would need to add Force to the Z Coordinate?
1
read the wiki its not that hard to read
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you!
No problem.