Roblox Studio tutorial · Beginner

Roblox Double Jump Script: Jump Again in Mid-Air

This Roblox double jump script lets players jump a second time while they are in the air. It is one short LocalScript, works with the Space bar and the mobile jump button, and every line is explained.

  • One LocalScript in StarterCharacterScripts
  • Uses Humanoid states and UserInputService
  • Works with the Space bar and the mobile jump button

Step by step

  1. Open StarterCharacterScripts

    In the Explorer, expand StarterPlayer and find the folder StarterCharacterScripts. Anything inside it is copied into each player's character every time the character spawns, which is exactly what a double jump needs.

  2. Insert a LocalScript

    Hover over StarterCharacterScripts, click the plus button and choose LocalScript. Rename it DoubleJump. It must be a LocalScript, not a Script, because jumping is controlled by the player's own device.

  3. Paste the double jump code

    Delete the default print line and paste the script below. Read the comments: canDoubleJump remembers that you are in the air after a real jump, and hasDoubleJumped stops a third or fourth jump.

  4. Test it in Play mode

    Press Play (F5). Jump once, then press Space again near the top of the jump. Your character should jump a second time. Try pressing a third time: nothing should happen until you land.

  5. Test the edge cases

    Hold Space, tap very quickly, walk off a ledge and reset your character. A good developer tests the weird cases, not only the normal one. If something feels off, adjust the 0.2 second wait slightly.

  6. Try it on a phone layout

    Use Studio's device emulator to preview a phone and test with the on-screen jump button. Because the script uses JumpRequest, the double jump should work there too.

The script

LocalScript — put inside StarterPlayer > StarterCharacterScripts
-- LocalScript inside StarterPlayer > StarterCharacterScripts
local UserInputService = game:GetService("UserInputService")

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local canDoubleJump = false   -- true once we are in the air after a normal jump
local hasDoubleJumped = false -- stops a third, fourth, fifth jump...

-- Watch what the character is doing (jumping, falling, landing...)
humanoid.StateChanged:Connect(function(_oldState, newState)
	if newState == Enum.HumanoidStateType.Jumping then
		if not canDoubleJump then
			-- short pause so one key press doesn't trigger both jumps
			task.wait(0.2)
			if humanoid:GetState() == Enum.HumanoidStateType.Freefall then
				canDoubleJump = true
			end
		end
	elseif newState == Enum.HumanoidStateType.Landed then
		-- back on the ground: reset for the next jump
		canDoubleJump = false
		hasDoubleJumped = false
	end
end)

-- JumpRequest fires for the Space bar and the mobile jump button
UserInputService.JumpRequest:Connect(function()
	if canDoubleJump and not hasDoubleJumped then
		hasDoubleJumped = true
		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	end
end)

Not working? Common mistakes

The script does nothing at all.

Check that it is a LocalScript and that it sits directly inside StarterCharacterScripts. In StarterPlayerScripts, script.Parent is not the character, so WaitForChild("Humanoid") waits forever.

The second jump triggers by itself when I hold Space.

Holding jump keeps sending jump requests. Tap the key twice instead, or increase the 0.2 second wait a little so the second jump needs a fresh press.

I can jump forever and fly across the map.

Make sure hasDoubleJumped is set to true before ChangeState and is only reset in the Landed branch of StateChanged.

What this Roblox double jump script does

A double jump is one of the first mechanics players notice in an obby or platformer. This roblox double jump script lets a player press jump once to leave the ground, then press it again in mid-air for a second boost. After landing, the double jump resets, so it cannot be spammed to fly across the map.

If you are wondering how to make a double jump in Roblox without a complicated system, the answer is to let Roblox do the physics. The script does not push the character with forces. It simply tells the Humanoid, the object that controls walking and jumping, to enter the Jumping state again. Roblox then applies a normal jump using the character's JumpHeight.

You will put the code in a LocalScript inside StarterCharacterScripts. Roblox copies it into every character each time it spawns, so the double jump keeps working after a player resets or falls into lava.

How it works: Humanoid states and JumpRequest

A Humanoid is always in some state: Running, Jumping, Freefall (falling or in the air), Landed and more. The roblox double jump script listens to StateChanged to know what the character is doing.

  1. When the state becomes Jumping, the script waits 0.2 seconds. If the character is now in Freefall, it is really in the air, so canDoubleJump becomes true.
  2. When the player asks to jump again, UserInputService.JumpRequest fires. If canDoubleJump is true and the player has not double jumped yet, the script calls humanoid:ChangeState(Enum.HumanoidStateType.Jumping).
  3. When the state becomes Landed, both flags reset.

Why the 0.2 second wait? JumpRequest can fire several times for one key press, and the Roblox docs recommend a debounce. The short wait makes sure the first press is not counted as the second jump.

It has to be a LocalScript because the player's own computer controls their character's movement. ChangeState only works from the side that owns the character, which for a player is their client.

Ideas to level up your double jump

Once your Roblox double jump script works, try one of these challenges:

  • Triple jump: replace hasDoubleJumped with a counter, jumpsUsed, and allow jumps while jumpsUsed is less than 2.
  • Stronger second jump: raise humanoid.JumpHeight just before ChangeState and set it back on Landed. If your game uses JumpPower instead, change that property.
  • A puff of smoke: put a ParticleEmitter in the character's HumanoidRootPart and call Emit(10) on the double jump.
  • Unlockable power-up: only allow the double jump after the player touches a special part or reaches a stage in your obby.

Double jump fits perfectly into an obby. Follow our obby tutorial to design stages with gaps that are only possible with a second jump, and add a kill brick below them.

Parent note: why this is a great first script

The double jump is short, but it teaches three ideas that appear in every programming language: events (code that runs when something happens), boolean flags (true or false variables that remember what already happened) and the difference between the client and the server.

Kids also practise testing properly: jumping once, jumping twice, holding the key, falling off an edge, and checking that the reset works after landing. Thinking about edge cases like these is exactly what professional game developers do.

You do not need to know Luau to support your child. Ask them to explain what canDoubleJump means and what happens when the character lands. If they can explain it in their own words, they have understood the script, not just copied it.

Want your child to build full games like this?

Want your child to build full games like this? First 1-on-1 lesson free.

In our live Zoom lessons, Vlad Pomazanets helps students aged 8–17 go from single mechanics like this double jump to complete Roblox games with stages, coins, shops and their own ideas. Each lesson is 60 minutes, one student and one teacher, in English, Ukrainian or Russian.

The first lesson is free. After that, lessons are CA$280 for 4 (CA$70 each), with a money-back guarantee on unused lessons within 14 days. We will match a time in your time zone.

Book a free Roblox class or read about the Roblox Studio course.

Questions parents ask

Where do I put a Roblox double jump script?

Put it in a LocalScript inside StarterPlayer, then StarterCharacterScripts. Roblox copies everything in that folder into the player's character when it spawns, so script.Parent is the character and the script can find the Humanoid. A normal Script or a LocalScript in StarterPlayerScripts will not work with this code.

Does this double jump work on mobile and tablets?

Yes. The script listens to UserInputService.JumpRequest, which fires when a player presses the Space bar or the jump button on a touch screen. That is why it is better than checking only for the Space key, which would leave phone players without a double jump.

Can exploiters abuse a double jump?

Character movement is controlled by the player's own device in Roblox, so a cheater can already change how their character moves with or without your script. A client-side double jump does not make that worse. For competitive games, developers add server checks later, which is an advanced topic.

How do I make the second jump higher?

Just before calling ChangeState, increase humanoid.JumpHeight, for example to 12, and set it back to the normal value when the Landed state fires. If your game settings use JumpPower instead of JumpHeight, change JumpPower in the same way.

Why can't I double jump after walking off a ledge?

This version only enables the double jump after a real first jump, which keeps it predictable. If you want a jump in the air after falling, also set canDoubleJump to true when the state becomes Freefall. Test it carefully so players cannot get two extra jumps.

Want your child to build full games like this?

Book a free first 1-on-1 Roblox lesson with Vlad on Zoom. 60 minutes, ages 8–17, English, Ukrainian or Russian. We'll match a time in your time zone.

Book a free lesson

Book a free lesson

Money-back guarantee Not a fit? Unused lessons are refunded within 14 days.
CA$70 per 60-min private lesson ≈ US$50. Large US schools charge US$60–75 for 50–60 minutes.
One mentor, live, 1-on-1 English, Ukrainian or Russian. Vulnerable Sector Check. Parents welcome to watch.
★ What parents say

5 / 5 · 1 review

★★★★★

“We were looking for coding classes for kids in Hamilton and a friend recommended Exclusive-IT. My 11-year-old started the Roblox course one-on-one and built his first real game in a few weeks. The mentor is patient, the lessons are in plain English, and my son actually looks forward to them. Highly recommend for any parent who wants their child to learn to code.”

Parent · Hamilton · Roblox