Get a int number from other player on PhotonNetwork

Hello, I’m using PhotonNetwork but I’m starting on the plugin, I done a simple scene, when players join on a room and enter on the scene, he can click on an box, and a variable int will count how much clicks the player done.
The problem is that my variable is unique per player, so when I click only the client see, but another players dont see how much clicks the other player done.

Here my script:

using UnityEngine;
using System.Collections;
 
public class ClickToCount : MonoBehaviour
{
    int clicks;
 
    PhotonView photonView1;
    public void Awake()
 
    {
   
       // PhotonNetwork.automaticallySyncScene = true;
 
    }
    void OnMouseDown ()
    {
        print("foAi");
        if (transform.gameObject.tag == "Player")
        {
            clicks++;
            print("foi");
        }
    }
    void OnGUI()
    {
     
 
        foreach (PhotonPlayer bucetao in PhotonNetwork.playerList)
        {
            GUILayout.Box(bucetao.name + ":" + clicks);
     
        }
    }
 
}

Here is a print for easy understand, each guest is one player, if I click all players cont 1 click but only for this client (on other player client the count still 0 if he dont click).

The issue here is that you are displaying the same local variable alongside the names of each of the players.

From what I can see, you aren’t sending any information across the network yet.

I suggest watching this video: Multiplayer FPS in Unity 3d, Part 4: Setting up the networking! - YouTube

This should let you know how to send and receive data.

That was my last try, but info and stream are aways null

using UnityEngine;
using System.Collections;

public class ClickToCount : MonoBehaviour
{
    int clicks;
    int todosClicks;
    PhotonView photonView1;
    public PhotonMessageInfo info;
    public PhotonStream stream;
    public void Awake()
    {

         PhotonNetwork.automaticallySyncScene = true;
        print(info);
              print(stream);
    }
  
    void OnMouseDown()
    {
        if (transform.gameObject.tag == "Player")
        {

            clicks++;
       
        }
    }
   

    public void OnPhotonSerializeView()
    {
        if (stream.isWriting)
        {
            stream.SendNext((int)clicks);
        }

        else
        {
            this.clicks = (int)stream.ReceiveNext();
            
        }
    }
    void OnGUI()
    {


        foreach (PhotonPlayer bucetao in PhotonNetwork.playerList)
        {
            GUILayout.Box(bucetao.name + ":" + info);
            

        }
    }



}