I want to give a kill score to the person who killed me. How can I do it?

Good morning.
I want to give a kill score to the person who killed me.
How can I do it?

  If (coll.gameObject.tag == "OtherPlayer") {
 
            If (myHp.value <0) {


// Die ();
// -> Give the killer a kill score. Blah blah

            }


}

Comments

  • Hi @J830930,

    you can use PUN's integrated Score extension for this. In your case that would be something like this: coll.gameObject.GetComponent<PhotonView>().AddScore(1);.