How to make player bounce up?

I want the player to bounce up a bit after they touch a part

1 Like

Inside of a part:

script.Parent.Touched:Connect(function(touch)

local char = touch.Parent

if game.Players:GetPlayerFromCharacter(char) and char:FindFirstChild(“HumanoidRootPart”) and not char:FindFirstChild(“HumanoidRootPart”):FindFirstChild(“BodyVelocity”) then

  local bodyVelocity = Instance.new("BodyVelocity")
  
  bodyVelocity.Velocity = Vector3.new(0, 150, 0)
  bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  bodyVelocity.P = math.huge
  
  bodyVelocity.Parent = char.HumanoidRootPart
  
  
  wait(0.3)
  
  
  bodyVelocity:Destroy()		

end
end)

– change the “150” in bodyVelocity.Velocity = Vector3.new(0, 150, 0) for the power

1 Like

thank you so much ima try it out

1 Like

thank you so much, this code works perfectly

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.