OnTriggerEnter works twice

Hi, I’m making a basic top down shooter game with Photon where players dual wield guns and I have an issue.In my bullet script I have a function which gives the shooting player a point if it kills the enemy.

When 2 bullets collide with the player at the same time and kill the player, point increases twice instead of once. I think it’s because both bullets trigger the score increase in the same frame but I don’t know how to get around it.

private void OnTriggerEnter2D(Collider2D collision)
    {
        
        if (!photonView.IsMine)
        {
            return;
        }
        PhotonView p = collision.gameObject.GetComponent<PhotonView>();
        if (p != null && !p.IsMine)
        {
            if (p.CompareTag("Player"))
            {
                p.RPC("SetHealthBar", RpcTarget.All, damage);
                if (collision.gameObject.GetComponent<HealthSystem>().fillingImage.fillAmount <= 0)
                {
                    gM.killCount++;
                }
            }
            Destroy(gameObject);
        }
        if (p.CompareTag("Obstacle")) //destroy on collision with obstacles
        {

            Destroy(gameObject);
        }

Is this code on the bullet or on the player that gets hit?
If this code is on the bullet, the simple fix would be to move the point scoring to the individual player script to avoid the bullet hit problem and simply do a health check if hp < 0 then ++point;

Just set some “IsKilled” boolean flag on a player to true when the health points are zero or less, and only increase the killcount when the player that was hit doesnt have the “IsKilled” flag set to true.
You could reset that boolean flag back to false after a respawn.

Besides, consider implementing some sort of Health property instead of doing health checks based on a fill amount of an image.