Weapons Returning to Idle?

How would I make a weapon return to an idle animation after a different animation is finished?

Say like, as soon as the weapon is done playing an animation, it would switch back to playing the idle animation.

Add a timer (best would be “if !AnimationDuration or CurTime() >= AnimationDuration then” on think hook), after playing any other animation set the AnimDuration variable to the CurTime() + the duration of the animation (after playing another animation first) with this **[Entity.SequenceDuration

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.SequenceDuration)**, and set the animation play as idle on when the timer ends (also nil the anim duration if you used with the think hook).