Can someone make me a five second script (serverside) that makes it so when any NPC in the server touches water they die? It would be greatly appreciated. THANKS IN ADVANCE!
Untested, but it should work
for k, npc in pairs(ents.FindByClass(“npc_*”)) do
if npc:WaterLevel() > 0 then
hook.Add(“Think”, “NPCWaterDeath”, NPCWaterDeath)
I would do it on Tick