Character glitches and fling when he walks straight into a wall

I have a custom sprinting system, and when the player accelerates towards a wall, the player keeps moving forward as if there is nothing in the middle of his path and then start glitching against the wall. I tried to create a raycasting script that makes the player stop when there is something in their path, but it didn’t work, so I have not been able to fix the error. Here is a showcase of the bug:

1 Like

Make sure you’re raycasting with the humanoidRootPart’s look vector. I would double check that your raycasting is working correctly. I see no reason for raycasting not to work.

Yes, but I mean that the player is kind of thrown towards various angles when he jumps while sprinting towards the wall, you didn’t notice it?

Can you show the raycast script? Does the demo video you sent have the raycast script? If not, what happens when you have the script?

1 Like

nvm, i already fixed this error, but I forgot that I had posted this forum, im sorry, thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.