Help making my player movement script behave more like a humanoid

Sorry I need to start with a bit of background here before I can get to the problem. I am currently working on a game where I would like to rewrite the logic that govern’s humanoid players movement and I am in the process of exploring my options. Currently I am sort of attaching a player to a box that slides around and is in charge of any movement related interactions while the player model is not CanCollide with all of the humanoid’s states disabled. The most important benefit to this system to me is that I do not have to wrestle with any humanoid physics as well as making it so that when the player is pressed against a wall and they rotate, they will not be pushed away from the wall and can smoothly slide against it while midair (an important requirement for my game to function). Below is a small demonstration of the interactions with walls working as I intend them to.

This however presents me with some large issues.

  • Map design has to accommodate the bulky nature of these players.
  • I can’t use the information the humanoid normally provides me with, such as knowing if I am grounded.
  • The player model cannot climb stairs and can get caught on even the tiniest bit of geometry that isn’t a ramp.
  • I can’t do a lot of things that the player normally can do, such as climbing up ladders or swimming without having to code them from scratch.
  • I have to rewrite the logic for animating the player.

The main things I want to do is to control how the player accelerates when keys are pressed (like I can now) and I need the player to be able to rotate against walls without getting pushed back. Any suggestions?

This seems like a very tedious task and your best bet is to recreate the humanoid object like make a empty mesh and call it humanoid then put all the values you need in there, and as you said about not being able to know if the character is grounded I recommend using a ray cast then calculate the distance using magnitude and if the distance is over 0 (use math.floor for the distance) then set the grounded value in the pLayers fake humanoid to false if it isn’t then set it to true I hope this works!

Edit: great idea btw I hope it works out well

Just thought of another idea have a raycast around all the players sides. Down at the feet if it hits something and you are very close it will move your player character up the height of the object and move you forwards a bit but with this comes issues like the stairs have to be an individual block and to hide the air gap underneath them you would have to use separate parts, once again hoped this helped you

1 Like

If this does end up working please tell me

The grounded check actually works right now. The real issue with it is that I am worried about the number of rays I have to cast to make the blind spots small enough to ignore.

Your suggestion for stairs though is definitely new and I will definitely be giving it a shot if I can’t find a more elegant solution than what I have now. The new mesh thing is especially interesting. Do you know anything about luanoid? I have heard about it but I have never touched it. It might save me work but idk if it could support your suggestions.

A luanoid, I’ll look into it (30 charsssssssssssss)

Just thought instead of using raycasts use invisible parts that when touched act like a ray cast

1 Like

Cause I know ray casts can be laggy

What’s the reason you don’t want to use a humanoid or is this to just challenge yourself?

He needs certain features that then normal humanoid doesnt give, if you were to read what he said at the top you would understand

What makes you think I didn’t read???
Not one thing he said up there explains why hes not using a regular humanoid

He does… (30 charssssssssssssssss)

1 Like

Quote it please I’d like to see

“ not be pushed away from the wall and can smoothly slide against it while midair (an important requirement for my game to function)”

1 Like

The ability to slide against walls without the turning of the root part interfering is important to creating a good rocket jumping system, especially one that supports smooth wall jumps.

The other part is that I am trying to control the behavior of the player. Things like bunny hopping, strafe jumping, airstrafing, etc. do not seem to be possible with the humanoid’s built in controls. The razor sharp midair control that players normally have in roblox would break my game.

That doesnt even explain the reasoning why he’s not using a humanoid… just something hes arbitrarily stating

That does that’s the main reasons why he is re creating the logic of the humanoid because of the features the normal humanoid has that would break his game

I think trying to create a humanoid esk type thing from scratch is just more work then needed, to try to accomplish “smooth wall jumps”, theres always a way to do something, Have you not tried different methods on trying to perfect that for a humanoid?

That problem comes from the use of the humanoid. The humanoid root part does not offer much customization in the way of reshaping the way the player collides with the world.

So can you state to me what exactly your trying to accomplish because the essay up there kind of threw me for a loop.