Entity damage

Is there a way to make it so if your entity is damaged then it will tell you who damaged it?

If by your entity you mean your SENT use **[ENT.OnTakeDamage


Otherwise use **[Gamemode.EntityTakeDamage


What I am trying to do is when a darkrp microwave is damaged it will tell everyone who has damaged it.

This is what I have and I know it is probably horribly wrong

function GM:EntityTakeDamage( ent, attacker, ply )
if ent:GetClass() == "microwave" then
Notify(ply,1,4,  attacker:Name() .. " has damaged a microwave")

You’d need to know who the microwave belongs to.

Not really. The code he posted should work fine.