Make the player's movedirection 0 when walking into a wall

how would i do this?
thanks :slight_smile:

Can you explain what you’re trying to do at a higher level? https://xyproblem.info

1 Like

Well you cant really set move direction because its a read only property

I mean you could raycast while the move direction isnt 0 and then you could make the walkspeed 0, but then youd be stuck though…

image

MoveDirection i’m pretty sure is readonly. This would be impossible

1 Like

You could make a Vector3 attribute on the Humanoid, name it “CustomMoveDirection” or something, and using GetPropertyChangedSignal, set it to the Humanoid’s MoveDirection. Then, to actually set it to zero, try using astralboy’s solution with Raycasts.

Note that this won’t affect the core scripts using :MoveTo() or :Move(). If you want that, that would be impossible, unless done by Roblox.

What color scheme is that if i may ask?

1 Like

The theme is called “One Dark Pro”

1 Like

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