Advertisement
OEAgamer1

Jump Pad

Jan 24th, 2024
1,175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local jump = script.Parent
  2.  
  3.  
  4. local function jump_pad(otherPart)
  5.  
  6.     local hrp = otherPart.Parent:FindFirstChild('HumanoidRootPart')
  7.  
  8.     local bodyVel = hrp:FindFirstChildWhichIsA('BodyVelocity')
  9.  
  10.     if hrp and not bodyVel then
  11.  
  12.         local newVel = Instance.new('BodyVelocity')
  13.  
  14.         newVel.Velocity = Vector3.new(0,100,0)
  15.  
  16.         newVel.MaxForce = Vector3.new(10000,10000,10000)
  17.  
  18.         newVel.P = 50
  19.  
  20.         newVel.Parent = hrp
  21.  
  22.         wait(1)
  23.  
  24.         newVel:Destroy()
  25.  
  26.     end
  27.  
  28. end
  29.  
  30.  
  31. jump.Touched:Connect(jump_pad)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement