A way to better simulate knockback/jump effects

I am trying to make an alternative to simple roblox jumping using bodymovers. The one I’m using now is a bodyvelocity. I tried doing something simple by simply placing a bodyvelocity in the character’s humanoidrootpart (R15) with a velocity set to (0,30,0), then using the Debris service to remove it after 0.1 seconds. This works sometimes, but doesn’t other times. 0.1 seconds isn’t very consistent because sometimes it removes the bodyvelocity on time while other times it gets removed too soon resulting in the character leaving the ground, but then immediately falling back down as opposed to “jumping” into the air, then falling. Is there a better alternative to this other than just using “Humanoid.Jump”?

3 Likes

Maybe try telling each client to change their velocity to a certain amount. This is how humanoid jumping works - it just increases Y velocity by 50(or whatever jumppower you may have set). If you do this for each client, it should work more smoothly.

1 Like

Do you mean to still use a bodyvelocity or just the velocity property of the humanoidrootpart?

Just change the velocity of the HumanoidRootPart, that should do it I think.

Alright I’ll try that. Thanks!

1 Like

This method seems to work up until the character is on the ground. Then whenever I try changing the velocity, it just resets it to 0,0,0.

1 Like

Try changing the humanoid’s state type to jumping or freefalling before setting velocity, whichever works.

1 Like