Make player jump higher

Roblox’s JumpHeight seems to be limited to a specific number, and even when changing it to an absurdly huge number it still does not jump high. Just a couple thousand studs.

Is there a way to bypass that limit or implement a better jumping system? I have tried BodyVelocities but I cannot find a way to detect when the player is at the peak of their jump and falling down.

3 Likes
--LocalScript .. StarterCharacterScripts

local plr = game:GetService("Players").LocalPlayer

local function onChar(char)
	local root = char:WaitForChild("HumanoidRootPart")
	local lastYVel = 0

	while true do
		task.wait(0.1)
		local yVel = root.AssemblyLinearVelocity.Y
		if lastYVel >= 0 and yVel < 0 then
			print("Highest point reached, now falling")
		end
		lastYVel = yVel
	end
end

plr.CharacterAdded:Connect(onChar)
if plr.Character then onChar(plr.Character) end

That was ridiculously hard. Just to get that part of it working without a mile of code.

1 Like

Thanks! It may work for normal jumping, but I would like to find a way to implement a system like that for BodyVelocity. I tried your code with BodyVelocity and it says im free falling when I start jumping, and not at the peak :slight_smile:

Ya I didn’t answer that part… This is for falling.

Yeah it doesnt detect falling either, it says its falling even though I just jumped.

1 Like

You can just apply a vertical impulse to the humanoid root part when the player wants to jump:

local function jump(jumpForce: number)
    humanoidRootPart:ApplyImpulse(Vector3.yAxis * jumpForce)
end

To know if the player is falling down, you can also check the humanoid root part’s velocity. If the Y component of the velocity is negative, they are falling.

1 Like

I guess so … shows that as soon as it hit that state. I fixed it.

FreeFall is for when the character is in the air, they don’t necessarily have to be falling. They could still be going up and be in FreeFall

Thanks. I am using that method and it seems to be working fine! How would you recommend I detect when they land

1 Like

Use Humanoid.StateChanged

humanoid.StateChanged:Connect(function(oldState, newState)
    if newState == Enum.HumanoidStateType.Landed then
        -- Landed
    end
end)
1 Like

Wow, I was overcomplicating things. I thoght state changed only applied for default roblox Jumping and movement.

Yeah there’s lots of states you can check for you can see them here

Ya, I fell for this too. :man_facepalming: … It can’t do the top of the fall thing.
I did find this however and based a script off that, that did work. (re-posted above)

“The player has reached the highest point of their jump when their y velocity passes from positive to negative. This goes for switching any direction, not just jumping.”

1 Like

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