ENT:OnTakeDamage(dmg)

What is the “or 100” for?


self.damage = ( self.damage or 100 ) - dmg:GetDamage()

It’s there so if self.damage somehow returns nil, it’ll replace nil with 100 so either ways it’ll take a damage and not return an error “attempt to perform arithmetic on a nil value”