JumpPad doesn't work

So i’m making just a map for fun but i wanna add some effects like a Jump Pad
I searched up a code but it doesn’t work, every code I use doesn’t work.
The player is jumping but not the height I want. Is this a problem in the script because I can’t find it? :frowning:

Here is the script (I set JumpPower to 999999999 so I can see the results but that doesn’t work, even if I set it to 100 it doesn’t work)

script.Parent.Touched:Connect(function(hit)
	humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid ~= nil then
		humanoid.JumpPower = 999999999
		humanoid.Jump = true
		wait(1)
		humanoid.JumpPower = 50
		humanoid.Jump = false
	end
end)

thanks for reading this and hopefully helping me

1 Like

Are you able to check if the humanoid.JumpPower value is changed at all while debugging? Humanoid may also just be nil in your code as well so nothing happens. You can try adding some breakpoints or print() statements to see what gets done in your code.
You could try something like to test, and also change humanoid = to local humanoid =

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local humanoid = hit.Parent:FindFirstChild("Humanoid")
        humanoid.JumpPower = 100
        humanoid.Jump = true
        wait(1)
        humanoid.JumpPower = 50
        humanoid.Jump false
    else
        print("No humanoid")
    end
end)
1 Like

It’s not printing anything :confused:

Did you try using my code snippet? There is the possibility the code just isn’t running either, is it in a local or server script?

I used you’re code in a script, if I tried it in a localscript, nothing works

Try changing in into a server script. Local scripts with .Touched events are a bit iffy (at least for me)

Is server script just the name Script?

if so, that was my first try and then i tried in a local but doesnt work to

Server Scripts are called Script in studio.
Local Scripts are called LocalScript in studio.
Here are some other topics with similar issues to your’s as well.
1
2

If you want it to jump, use the humanoid.jump feature. Changing the jumpPower won’t make the character jump.

(Pretty sure humanoid.jump only works in a localscript, you can try it in a server script tho. If it doesn’t work, just use remotes.)

The only instance that I really see is that the Jump property isn’t replicated across both sides, but that’s about it