Advertisement
HowToRoblox

LaunchScript

Apr 21st, 2020
3,778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local bouncePad = script.Parent
  2.  
  3. bouncePad.Touched:Connect(function(touch)
  4.    
  5.    
  6.     local char = touch.Parent
  7.    
  8.    
  9.     if game.Players:GetPlayerFromCharacter(char) and char:FindFirstChild("HumanoidRootPart") and not char:FindFirstChild("HumanoidRootPart"):FindFirstChild("BodyVelocity") then
  10.        
  11.        
  12.         local bodyVelocity = Instance.new("BodyVelocity")
  13.        
  14.         bodyVelocity.Velocity = Vector3.new(0, 300, 0)
  15.         bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  16.         bodyVelocity.P = math.huge
  17.        
  18.         bodyVelocity.Parent = char.HumanoidRootPart
  19.        
  20.        
  21.         wait(0.3)
  22.        
  23.        
  24.         bodyVelocity:Destroy()     
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement