Is there a way to detect if a player is going down a hill/wedge?

I have this sliding script but I want to make it so if you are sliding down a hill/wedge you will continue sliding until you reach a flat surface.

Here is the script:

For that you would probably need to use raycasting to find whether the partType of the part the player is ontop of is a wedge and use a for loop to continue sliding them down until the raycast says that the part underneath is no longer a wedge.

Find more here.

Alternatively, you could use the MaxSlopeAngle property of Humanoid to force them to “fall” on steep angles. If you want to play a particular animation while they are sliding, you may need to additionally apply a method like the one mentioned above to check when the player is sliding down a slope. There is no HumanoidStateType for this, so you will have to use raycasting or some other custom approach to check when they are sliding.

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