I’ve searched in the character module for the character but haven’t been able to find anything that handles the characters jump state? How are they handling the player jumping? I don’t think they’re exactly just setting the velocity on the y value only since the players can freely move easily and they don’t get “stuck” to the floor whereas setting the velocity on the y value has the player stuck unless they move/jump/force higher velocities.
You can check if a player is jumping with tis event Or yo can force them to jump with this function, also change the jump power property to set the jump y velocity.
I know how to detect the jumps and so on however, I want to know the code behind how roblox does their jump system on the characters.
Sorry I can’t help you with that but you could always make your own custom physics.
I’m pretty sure Jumping is handled from CoreScripts, which you cannot access nor edit.
So nobody knows how it functions? I dont plan to edit the corescripts or access them, I just want to know how it is being handled so I can build off of it.
Jumping is handled mostly by Roblox physics, which you cannot manipulate.
All Jumping does is change your Y velocity upwards, and physics will do the rest.
I’ve seen somewhere a github repository with Roblox core scripts, I think it’s this one and you can check it out: GitHub - Roblox/Core-Scripts: All of ROBLOX's core client scripts.
no, the control scripts are in starterplayer and you can access them while playtesting.
Accessing the control scripts only show bools being enabled and disabled/vice versa. I believe the code may actually be with the humanoid object however, I don’t see/know a way of finding the code behind how certain classes/objects/instances work.
I searched inside of the Core-Scripts and from the link @cutegxrI has given, I’ve found something which I think is relevant to how they do jumping. Screenshot Below
Now that I think about it, this might just be for movement not jumping, as they have a separate function for jumping, which just sets a sate.
Quite odd that the movement code is stored somewhere else in humanoid since it is usually changed.
I’m pretty sure Roblox handles the actual updating and application of movement, including jumping on the c++ side of the engine. If I were to give advice I would say you could get a pretty simple jump by just applying a upwards velocity to an object in one heartbeat step.