Need ideas how implement such jumping mechanic

Hi guys!

I want make jump mechanic, where the longer you hold “Spacebar”, the higher your jump will be. (Example - terraria jumps). I need this thing for better character controlling.
I know that there’s humanoid.Jump function, but I don’t think I can utilize it for such jumps, so, I need some help with getting idea how to make such system.

Any help is appreciated!

1 Like

I would personally recommend making your own controller as you would have more control over its behavior rather than patching extra code on top.

But if you want to use the default humanoid, you can simply temporarily add a force modifier that goes upwards while spacebar is held down, and either resets or goes down when you let go.

2 Likes

I can try to do anything - even scripting something big myself. But if I don’t use default humanoids I’ll run into controlling problems like Hip height, Move functions and etc.

1 Like

You could give the players body velocity
Example
Local Jumpamount = how much you want them to jump

Playerbody.Velocity(playerbody.Velocity.X,
playebody.Velocity.Y += Jumpamount,playerbody.Velocity.Z)

Then as suggested, have a VectorForce dynamically increase and decrease attached to the humanoid’s rootpart depending on the input.

1 Like

Just so thin along thoes lines

1 Like