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

[Question] Make Player On Hit Fly Back?

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

1 comment

0

Do you want the player to fly backwards?

1 answer

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)

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