I feel very stupid for asking this but I’ve turned despite. So im trying to get a int to show how many people escaped something. Whenever a player collides with the escape place it shows up you escaped and "int + out of 4 people escaped. But it won’t sync the int. By the way im using photon Pun 2. Here is the script.`public class c : MonoBehaviour, Photon.Pun.IPunObservable {
public Text text;
private int escaped;
public PhotonView photonView;
void Start () {
}
public void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.name == "bobbobbob(Clone)")
{
escaped++;
}
}
// Update is called once per frame
void Update()
{
text.text = escaped + " out of 4 escaped alive";
}
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.IsWriting)
{
stream.SendNext(escaped);
}
if (stream.IsReading)
{
escaped = (int)stream.ReceiveNext();
}
}`