How to make an NPC kill feed?

What do you want to achieve?
I was wondering if anyone has any advice on how to make an NPC Kill Feed. If an NPC kills the player, a GUI will pop up on the screen showing what NPC killed a player, of course with support of having multiple kill feeds on it at a time, which would disappear over time.

What is the issue?
I can’t find anybody talking about this, I’m not really experienced in coding still, and would love to hear some tips/advice on how to achieve this.

What solutions have you tried so far?
Like I said above, I can’t find anyone talking about this. I have tried looking EVERYWHERE in the dev forum. But still nothing. So now I’m here trying to ask for some advice.

(I’ll go more into depth on what I want to achieve)

As I said above I want a kill feed GUI to pop up (for everybody) when an NPC kills a player, I would want the GUI to show an image of what NPC killed the player, the name, and the player that died to it. also with an image of the player. (sorry for so much)

This is for a game that I’m currently developing that is not out yet so any tips and advice would be appreciated.

Thanks!

There’s no function or method that tells who or what killed the player. But I can give you a solution.

  1. The NPC will have a variable that keeps track of who they’re killing.
  2. If the NPC succeeds in killing the targeted player, then display the message. (If there are other things that kill the player you should check if the NPC actually made the player’s health go to 0.)

I do have a script that kills the player, how would I check if it succeeded in killing the player?

(should I send the script in?)

In the script, after you damage the player’s health, you can check if the player’s health is now zero. If it is, the NPC killed the player, and you can display a message to them.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.