I was working on this short little project and then suddenly when I added one simple if statement that should work, it just doesn’t work. Any idea why? TTT meta function btw
hook.Add("PlayerDeath", "Monitor", function(ply) if ply:HasEquipmentItem( EQUIP_MONITOR ) then print("It worked!") for k,players in pairs(player.GetAll()) do CustomMsg(players, ply:Nick() .. "'s death has been confirmed due to him having a heart beat monitor!", Color(255,0,0)) ply:SetNWBool("body_found", true) end end end)
Also no lua errors. Even if I try the EQUIP_RADAR and when I have it, doesn’t work.