Question about stripping players with StripWeapons()

I’m using it in a SWEP like this:
[lua]
self.Owner:StripWeapons(self.Owner:GetActiveWeapon():GetClass())
[/lua]

and although it’s working fine (it strips the player’s weapons), it still gives me a nil value. can anyone help me understand why?

thanks

StripWeapons doesn’t need an input because it strips all weapons. You want StripWeapon for one weapon, like your example

Just use



self.Owner:StripWeapon(self.Owner:GetActiveWeapon():GetClass())


Note that StripWeapon has no ‘s’.
I know AnonTakesOver already said this

also you dont need to do self.Owner:GetActiveWeapon() if self is the weapon, just do self:GetClass()