How do I Make A Slide Hopping System?

Hi! Im new to Roblox Developer Forums!

Im currently working on a Fast-Paced FPS game and im trying to make a slide hopping system so that the player can move around the map much faster.

All I want to know is what Services should I use or any examples?

Example:

You can probably utilize raycasts and a body position if you want accuracy/or any other type of force that moves the character.

Detect when a player wants to dash via UserInputService or ContextActionService (Though I like UserInputService :man_shrugging:) then:

Raycast on the side of the player and check if there is anything blocking the sides (that way they cant attempt glitches and go through walls/fling) once cleared, you can either:

Grab the position that the raycast ends at and use that for the position force.

OR

Push the character to the side with a force via slight nudge.

Omit this, thought post said side hopping

1 Like

Okay Thanks! Ill look forward into it and do some testing! Thanks for the help!

Misunderstood the title/desc :sweat_smile: , after seeing the video, I understand what you mean now so heres the actual suggestion:

Create a value that’ll store the “momentum” of the player.

Have the script do a normal crouch of course and a way to detect if the player is crouching or not via userinputservice to do the actual crouching action. Of course you’ll want to pair that crouching script with camera moving down a bit and player playing crouch animation/all the other things you want to do with hipheight.

Once that is done. Have a part of the script detect when the player is crouching. If you’re planning to use a boolvalue, use a .Changed, once it detects it. check if the value is true (crouching) or false (not crouching). If crouching, have the player build up momentum each and every consecutive time they jump forward.

To check if they’re jumping and moving forward, you can use move direction or walk property of humanoid. And also check the velocity if you want to.

Once that is done, use those values to determine the vector of which you plan to apply the momentum force since it seems like the jumping in that game only allows you to jump in the direction you decided at first.

Once that is grabbed, take that value and apply it to a force (just create a force instance inside the object, you can use the legacy objects or the new constraints if you know your way around scripting.)

And to cancel the momentum, detect if the player stops moving, velocity is suddenly halted, etc. And make sure to stop/disable the force once the player lands on the ground/stops.

(there might be a better way but this is one I can currently think of)

2 Likes