Help with multi jump

I’m trying to make a local script that overrides ROBLOX’s default space bar jump with a new jump. The new jump allows the user to multi jump in the air while falling and also while jumping, with my own jumping animation. The problem is, I’ve tried doing this with 5 different methods and every method, after the 2nd jump, the 3rd jump seems to have almost 0 power or very less power then the 1st jump.

I tried doing the multi jump by manualy applying velocity to the humanoid root part, and prevent the weak 2nd 3rd or 5th jump by conteracting gravity during the jump with a .Force = vector3().

Am I doing this completly wrong? And no, none of the double jump scripts work because they still use Roblox’s built in jump, and if I modify it, the 3rd and 4th jumps are weak.

1 Like

It would help if you posted your code that you were using to apply a manual velocity

1 Like

If you are building a new jump system from the ground up, use

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)

1 Like

Ok so I figured it out, don’t really know why but now it works.

UserInputService.JumpRequest:Connect(function()
	if not canJump then return end

	-- Lock
	canJump = false

	local genData = AniModule["General"]
	if genData and genData["Jump"] then
		local duration = genData.Jump(character)

		task.delay(duration, function()
			canJump = true
		end)
	else
		canJump = true
	end
	--doCustomJump()
end)

-- Reset jump count when land
humanoid.StateChanged:Connect(function(oldState, newState)
	print(Enum.HumanoidStateType)
	if newState == Enum.HumanoidStateType.Landed then
		jumpCount = 0
	end
end)

and jump function:

		Jump = function(character)
			local humanoid = character:WaitForChild("Humanoid")
			local hrp = character:WaitForChild("HumanoidRootPart")

			-- Load custom jump animation
			local animation = Instance.new("Animation")
			local animationIDs = AniIDs["General"]
			local animationId = animationIDs["Jump"][1]
			animation.AnimationId = animationId
			local animationTrack = humanoid:LoadAnimation(animation)

			-- Play animation
			animationTrack.Priority = Enum.AnimationPriority.Action
			animationTrack:Play()

			-- Apply a manual upward velocity boost
			local velocityBoost = 80
			local currentVel = hrp.Velocity
			hrp.Velocity = Vector3.new(
				currentVel.X,
				velocityBoost,
				currentVel.Z
			)
			
			return 0.3
		end,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.