Best way to detect which character killed another character

I am making a zombie game and I want to make it so that the player who kills a zombie gets the money. What would be the best way to do that.

2 Likes

You can keep track of who did damage with a string/object value stored inside that zombie, whenever the zombie dies, check for that value, reward the player.

1 Like