Forja

Roblox double jump script

Players press jump again in the air for a second jump, on any device.

Where it goes

  1. 1In the Explorer, open StarterPlayer, hover over StarterCharacterScripts, press + and choose LocalScript.
  2. 2Delete what's in it, paste this in and press Play.
  3. 3Jump, then press jump again in the air.
DoubleJump · a LocalScript in StarterPlayer > StarterCharacterScripts
-- From forja.us/tools/roblox-scripts/double-jump-- Press jump again in the air to jump a second time.local UserInputService = game:GetService("UserInputService")local character = script.Parentlocal humanoid = character:WaitForChild("Humanoid")local canDoubleJump = falselocal usedDoubleJump = falsehumanoid.StateChanged:Connect(function(_, newState)	if newState == Enum.HumanoidStateType.Landed then		canDoubleJump = false		usedDoubleJump = false	elseif newState == Enum.HumanoidStateType.Freefall then		-- A short wait, so holding the jump button doesn't use it up at once.		task.wait(0.2)		if humanoid:GetState() == Enum.HumanoidStateType.Freefall then			canDoubleJump = true		end	endend)UserInputService.JumpRequest:Connect(function()	if canDoubleJump and not usedDoubleJump then		usedDoubleJump = true		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)	endend)

How it works

  • StateChanged says when the character starts falling and when it lands.
  • JumpRequest runs on every jump press, on a keyboard, a phone or a controller.
  • ChangeState(Jumping) makes the character jump again in mid-air. usedDoubleJump stops a third one until they land.

Make it yours

Triple jump
Replace usedDoubleJump with a number, add 1 at each jump, and stop at 2.
Want something more? The script generator can write it: “A double jump that plays a sound and shows a puff of smoke on the second jump”

Maps to try it on: low poly maps

Start from a finished map, and your scripts have a game to run in.

More free Roblox scripts