Show player name + weapon + second player name

Hello, please how can i do it? I need that when a player1 with weapon kill a player2 so it shows up on screen? I would like to be previewed it this way: player1 + gun + player2. But how to do it?
Thanks advance.

Well, you will use something called string concatenation for that:

player1.name + " has killed " + player2.name + " with a " + weapon.name

or something like that.

Of course, you will need to have references to all those objects. The player should be easy enough to get, because I imagine you already have a raycast somewhere that will detect hits and cause damage. The weapon is a little more tricky, because you’ll need to find the weapon first (probably by getting the weapon component script). (I’m assuming here that both players and the weapons are gameObjects, and that they are named appropriately in the inspector)

Cheers

Thaks, but how can i do it? This is a mystery for me.