Set walkspeed to player when damaged by bullet

I am trying to create a weapon that whenever a player is shot by the gun, their walk speed is set lower than normal.

I know somethings about lua but not enough to know how to do this.

Thank you in advance to anyone who helps out!

You can store the time the player was shot in an

GM:EntityTakeDamage hook, thencall mv:SetMaxClientSpeed in a

GM:SetupMove hook by the speed you want.

Would it look something like this?

function EntityTakeDamage( target, player )
if ( target:IsPlayer() and player:TakeDamage() ) then




You need to use hooks, and you will store a variable on the player. Do not run SetWalkSpeed/SetRunSpeed – it will override other values.