Change HoldType on PrimaryAttack

Hello, when I do PrimaryAttack, it called serverside and on client who pressed, but not on another clients so they don’t see changes.



...
SWEP.HoldType = "normal"
...
function SWEP:PrimaryAttack()
    self:SetHoldType("fist") -- changes visible only for me (multiplayer)
end
...


P.S. Sorry for my English

You need to do this in shared.lua for it to work/network.

it’s already in it.

Just PrimaryAttack triggering at SERVER and CLIENT-only for owner, but need for each other.

E.G. I’m with u at server, we have wep:
weapon_example.lua (shared)



...
function SWEP:PrimaryAttack()
    print("pressed")
end
...


If I Press LMK (PrimaryAttack) “pressed” will printed in server console and my client console, but not in ur

You don’t need to set it on every client. You just have to set it shared on the weapon.

I can’t understan, can u write simple exaple please?

U said shared, PrimaryAttack calling shared? If yes so i changing holdtype on PrimaryAttack but I only see changes.