How does Roblox make the player jump?

I have looked through the PlayerModule and found that jump is not handled in there or in its submodules at all. The PlayerModule and its submodules handle jump by setting Humanoid.Jump to true whenever it detects the player wishes to jump.

My question is how does the humanoid object make the player jump? I have tried setting the AssemblyLinearVelocity of HumanoidRootPart but it does not mimick this behavior entirely. Is there any way to view the source code of the Humanoid object, or does anyone know how the Humanoid object handles jumping?

I’m pretty sure that everytime Roblox sees you press space, it ticks that on. From what i’ve seen, that checkbox makes the player jump pretty much immediately.

Just try using UserInputService and checking that box everytime the player presses Space or another key.

The PlayerModule detects when the player requests to jump. That module (one of its submodules) sets Humanoid.Jump to true. There is code somewhere in the Humanoid object that detects .Jump being set using most likely a metamethod. My question is HOW does the Humanoid object make the player jump? Does it set its Velocity (I have tested this and it does not mimick the behavior of jumping exactly so the object is doing something different or something else). It would be nice if the objects in Roblox were open-source.

If you set up an explosion with the parameters JUST RIGHT, you can mimick a jump almost perfectly. Spawn one directly under the player.

Perhaps something similar like that? Not sure.

It would not make sense why this would be what is built into Roblox to handle player jumping. I’m pretty sure that is not what the Humanoid object does. My goal isn’t just to mimic a jump but to figure out how Roblox does it in its source code.

Well, i have no clue how Roblox does it. Sooo, good luck searching, i guess.

It looks like they apply an impulse on the HumanoidRootPart.

Permalinks in the client tracker repository:
Character Controller
Impulse Calculation

1 Like

Wow, how did you find this code? Are there other amazing resources such as this that I should also know about?

Maximum_ADHD’s client tracker is invaluable for this kind of research. I searched for “.Jump” in the client tracker repo which led me to JumpCmd, and that made me discover the cool things in the “avatar” folder of the repository. I thought Humanoid’s code was purely written in C++ and that I’d only find breadcrumbs on how the humanoid works. Thank you for posting this because I had no idea the code was accessible until I tried to figure this out too.

The only other relevant resource that I can think of besides the client tracker is the FFlag tracker that Maximum_ADHD also created. It isn’t source code. It’s the constantly changing list of feature/test variables that client code references to release changes that don’t necessarily align with the weekly client updates.

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