Emit Sound and Set Color error?

Hello, I noticed today that my NES Zapper weapon was creating 2 errors.


[ERROR] gamemodes/terrortown/entities/weapons/weapon_zapper/shared.lua:253: Tried to use a NULL entity!
  1. SetColor - [C]:-1
   2. unknown - gamemodes/terrortown/entities/weapons/weapon_zapper/shared.lua:253

AND


[ERROR] gamemodes/terrortown/entities/weapons/weapon_zapper/shared.lua:225: Tried to use a NULL entity!
  1. EmitSound - [C]:-1
   2. unknown - gamemodes/terrortown/entities/weapons/weapon_zapper/shared.lua:225

I have tried pretty much everything and even tried removing the line completly but that just seems to create more errors.
If anyone knows how to remove this code or find a way around the errors please post a reply :slight_smile:

Thank you very much.
PS: I am trying to use this with TTT

Tell me code.
i’ll try to fix it as i can.