I have a weapon here, and I’ve created a poseparameter which blends between an idle animation and a running animation.

The question is, how would I be able to set the idle animation of a swep, set the pose parameter to blend into the running animation (when the player’s velocity increases), then after I take a shot it goes back to the idle animation?



I know about that, but I can’t do it correctly.

function SWEP:Think()	
local Speed = self.Owner:GetVelocity():Length()
local OnGround = self.Owner:OnGround()

if ( OnGround ) and ( Speed > 20 ) then 
self.Weapon:SetPoseParameter( "move_x", 0.4 )

This bit right here doesn’t work.