Changing weapon holdtype on secondary attack?

I’ve been trying to get my sweps to look holstered in 3rd person by setting their holdtype to normal when secondary attack is pressed. this is what I have so far.

function holsterWep() --this is always true for testing purposes
return true

function SWEP:SecondaryAttack()

if holsterWep() == true then
	self:SetWeaponHoldType( "normal" )



Problem is, nothing happens. I have a sneaking suspicion that hold type can only be set on initialization. If so, is there anyway around that?

It has to be done on both the server and the client. When playing singleplayer, if I remember correctly, a few weapon hooks such as PrimaryAttack and SecondaryAttack are not called clientside as they should be.

Try it on a listen server, if it works, then you’ll need to force your weapon to call SecondaryAttack clientside if SinglePlayer() is true.

This will be helpful:

Holy crap, it works on multiplayer, thanks! I never thought it would matter that I was testing on singleplayer. Since I only plan to use it on my server, can I just leave it as is? Or will that cause other problems?

Nah, don’t bother fixing it for singleplayer if it works fine on your server, it shouldn’t cause any problem.

Thanks again!