PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

MaxSlopeAngle

Humanoid

float

This property determines the maximum slope angle that a humanoid can climb. If the angle of a slope is greater than a humanoid’s MaxSlopeAngle, they will slide down the slope.

When a character spawns, this property is set according to the value of StarterPlayer/CharacterMaxSlopeAngle.

The value of this property is constrained to values between 0° and 89°. It defaults to 89°, so humanoids can climb pretty much any slope they want by default.


Code Samples


Limiting The Slope a Humanoid Can Walk Up

The example below demonstrates the effect of the MaxSlopAngle property by limiting the maximum slope the Players/LocalPlayer can walk up to 30°. The local player will slide down any slope greater than 30°.

This code below works as expected when placed in a LocalScript.