How to make a jump pad

How should I make a jump pad that boosts you into the air and the part that you touched that boosts you into the air won’t work for another 10 seconds.

I made this script

local debounce = false
script.Parent.Touched:Connect(function()
	if not debounce then debounce = true
		script.Parent.Velocity = script.Parent.CFrame.UpVector * 100 
		wait(0)
		script.Parent.Velocity = script.Parent.CFrame.UpVector * 0
		wait(10)
		debounce = false
	end
end)

is there a better way to organize this script? Like using a different method?

It doesn’t work for some reason. It only works once then does not work again. Its velocity also changes when I dont want it to. Its like a randomized jump pad basically in my own words. AlSo thats the other part. How do I set how high it goes and it keeps keeping the height it goes to instead of going up 10 studs then 9 then 8 and so on.

1 Like

Why not just obtain the Humanoid of the Character that touched the Part in the first place? Not sure why you’re using the Velocity property of a BasePart, as that’s deprecated

local DB = false
local Part = script.Parent

local function Touched(Hit)
    local Hum = Hit.Parent:FindFirstChild("Humanoid")

    if not DB and Hum then
        DB = true
        Hum.JumpPower = 75 --The Default JumpPower for a Humanoid is 50
        Hum.Jump = true
        wait(10)
        DB = false   
        Hum.JumpPower = 50
    end
end

Part.Touched:Connect(Touched)

I want to make it so when you touch the part you automatically jump.

Just set the Hum.Jump property to true then

hence this?

local DB = false
local Part = script.Parent

local function Touched(Hit)
	local Hum = Hit.Parent:FindFirstChild("Humanoid")

	if not DB and Hum then
		DB = true
		Hum.JumpPower = 75 --The Default JumpPower for a Humanoid is 50
		wait(10)
		DB = false   
		Hum.JumpPower = true
	end
end

Part.Touched:Connect(Touched)

I re-edited the script, it should make the Character who touches it automatically jump (Not simultaneously though) and have an increased Jump Boost for 10 seconds

it doesnt say you edited it…Probably my trashy wifi.

@JackscarIitt I don’t see the edit.

It’s the post I re-edited in Post #3

2 Likes

question: what does the jump refer to? Is it just an abbreviation for jump power?

also sorry about this but I realized that I want it make it so you dont have a jump boost it just makes you jump once.

It doubles as a way to see if the humanoid is currently jumping and also as a way to basically call :Jump() on the humanoid

oh. Thanks for that piece of knowledge.

1 Like

also never mind I figured it out.

Sorry, I should worded myself better. There is no :Jump() function in the humanoid, you should use your original solution of setting Jump to true. I meant to say that it’s like calling :Jump() as an example

1 Like