How to make SetActive to a specific game object owned by 1 player, but so that everyone else sees it

I have a game object called gun. The Photon View component is superimposed on this object. How can I make SetActive(true) or SetActive(false) so that the appearance of the cannon appearing or disappearing is visible to everyone, not just the player who draws or removes the cannon? And how to do it so that the "activity" of the guns of other players does not change at this moment?

The Internet says to use [PunRPC] along with view.RPC, but it doesn't work for me. Here is the code:

[PunRPC]
private void OnTriggerEnter2D(Collider2D other)
    {
        if (view.IsMine)
        {
            if (other.CompareTag("Weapon"))
            {
                for (int i = 0; i < allWeapons.Length; i++)
                {
                    if (other.name == allWeapons[i].name)
                    {
                        unlockWeapons.Add(allWeapons[i]);
                    }
                }
                PhotonView playerView = PhotonView.Get(this);
                playerView.RPC("SwitchWeapon", RpcTarget.AllBufferedViaServer); // конкретный участок использования RPC
                PhotonNetwork.Destroy(other.gameObject);
            }

            if (other.CompareTag("Bullet"))
            {
                health -= 10;
            }

            if (other.CompareTag("Heal"))
            {
                health += 10;
                PhotonNetwork.Destroy(other.gameObject);
            }
        }
    }

    [PunRPC]

    public void SwitchWeapon()
    {
        for (int i = 0; i < unlockWeapons.Count; i++)
        {
            if (unlockWeapons[i].activeInHierarchy)
            {
                unlockWeapons[i].SetActive(false);
                GameObject currentWepaon = unlockWeapons[i != 0 ? i - 1 : unlockWeapons.Count - 1];
                currentWepaon.SetActive(true);
                weaponIcon.sprite = currentWepaon.GetComponent<SpriteRenderer>().sprite;
                weaponIcon.SetNativeSize();
                break;
            }
        }
    }

No errors are output to the console.

Output to the console:

https://habrastorage.org/webt/ln/yq/4h/lnyq4hvextrcpkbu3nfirjfocja.png