AR2 Model Idle Animation after Reload (SWEP)

When a SWEP with an AR2 model reloads, it stays in the final reload frame and looks odd until you shoot. How do I force it to go back to it’s idle after reloading?

The same way you play attack animation, but using ACT_VM_IDLE instead of ACT_VM_PRIMARYATTACK.

I don’t play the attack animation manually…?

function SWEP:PrimaryAttack()

if ( !self:CanPrimaryAttack() ) then return end
self:ShootBullet( 9, 1, 0.014 ) 
self:TakePrimaryAmmo( 1 ) 
self.Owner:ViewPunch( Angle( -2.8, 0, 0 ) ) 
self.Weapon:SetNextPrimaryFire( CurTime() + 0.215 )


Using this code:

function SWEP:Think()

if CurTime() >= self.ReloadingTime then self:SendWeaponAnim( ACT_VM_IDLE ) end


I can manage to get it working. But then it spams script errors.

self:ShootBullet does.

Tip: Use self:SendWeaponAnim( ACT_VM_IDLE ) in the reload hook with a timer and self:SequenceDuration() for an easy solution.