Garry's Mod Wiki

Revision Difference

Player:SetWalkSpeed#547282

<function name="SetWalkSpeed" parent="Player" type="classfunc"> <description> Sets the player's normal walking speed. Not sprinting, not slow walking <key>+walk</key>. See also <page>Player:SetSlowWalkSpeed</page>, <page>Player:GetWalkSpeed</page>, <page>Player:SetCrouchedWalkSpeed</page>, <page>Player:SetMaxSpeed</page> and <page>Player:SetRunSpeed</page>. <bug issue="2030">Using a speed of 0 can lead to prediction errors.</bug> <note>player_default class run speed is: 400</note>⤶ <bug issue="2030">Using a speed of `0` can lead to prediction errors.</bug> ⤶ <note>player_default class run speed is: `400`</note>⤶ </description> <realm>Shared</realm> <args> <arg name="walkSpeed" type="number">The new walk speed when sv_friction is below 10. Higher sv_friction values will result in slower speed. Has to be 7 or above or the player won't be able to move.</arg> <arg name="walkSpeed" type="number">The new walk speed when `sv_friction` is below `10`. Higher `sv_friction` values will result in slower speed. Has to be `7` or above or the player **won't** be able to move.</arg> </args> </function>⤶ ⤶ ⤶ <example>⤶ <description>Sets the Walk Speed of the Player to 100</description>⤶ <code>⤶ player.GetAll()[1]:SetWalkSpeed(100);⤶ </code>⤶ </example>⤶ </function>