Finding the player who killed you (Multiplayer)

Hi guys, so i have a multiplayer game setup and so far you can shoot and kill your enemies. So the problem is that i am trying to get the name of the player who killed you, as well as send a message to that gameobject to add a score to the players’ kill streak. It is not done with raycast, bullets are instantiated and then move forward, if that info helps. So please can anyone please help me, i am using photon unity networking. Thanks guys!

ok i dont know your code so all of this is a big guess. All your network players if instantiated by Network.Instantiate will have a networkviewid which is unique.

Add a NetworkViewId playerId variable to your Gun
In your Gun script which will have a bullet prefab get the playerId from the the parent players NetworkView OnStart() and when instantiating the bullet in your gun script use GameObject bullet = Network.Instantiate(//add your args)

Your bullet script should have a NetworkViewId playerID variable. So after instantiating say bullet.playerId = playerId

//Maintain a List of all players for this to work
Now OnHit check the list of players for there NetworkViewId if it matches the bullets playerId then add to his score

Without the actual code this is the best i can help you with