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

[Question] Make Player On Hit Fly Back?

Asked by 6 years ago

How do i make player fly back

p.Parent.HumanoidRootPart.Velocity = char.HumanoidRootPart.CFrame.lookVector * 250
                local bodyvel = Instance.new("BodyVelocity", p.Parent.HumanoidRootPart)
                bodyvel.Velocity = Vector3.new(0,125,0)
                game.Debris:AddItem(bodyvel, .25)

i tried this but it makes it just fly up

0
Do you want the player to fly backwards? Geko97 29 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

its because your using the Y axis (up and down) you need to use X (or Z i forgot)

p.Parent.HumanoidRootPart.Velocity = char.HumanoidRootPart.CFrame.lookVector * 250
local bodyvel = Instance.new("BodyVelocity", p.Parent.HumanoidRootPart)
bodyvel.Velocity = Vector3.new(125,,0)
game.Debris:AddItem(bodyvel, .25)
Ad

Answer this question