Help with this trampoline script

Hey! I am trying to script a trampoline jumping script, but it simply isn’t working, when the player goes onto the part, it doesn’t jump them.

Here is the script:

script.Parent.Touched:connect(function(p)
if p.Parent:FindFirstChild(“Humanoid”)then
p.Parent.Humanoid.JumpPower = 70
wait(5)
p.Parent.Humanoid.JumpPower = 50
end
end)

Anyone got any ideas?

1 Like

You can use Humanoid.Jump to trigger a jump. This is a bool value that when true has the character jump. This will reset to false so no worries getting it to reset.

script.Parent.Touched:Connect(function(p)
   if p.Parent:FindFirstChild(“Humanoid”)then
      p.Parent.Humanoid.JumpPower = 70
      p.Parent.Humanoid.Jump = true --This is the added code.
      wait(5)
      p.Parent.Humanoid.JumpPower = 50
   end
end)
5 Likes

Thank you for helping me, I really appreciate it.

4 Likes