private void OnTriggerEnter(Collider other) { if (nextCheckpoint.transform == other.transform && other.CompareTag("Checkpoint")) { if (currentCheckpoint < CheckpointsRanks.Count - 1) { currentCheckpoint++; } else { currentCheckpoint = 0; } nextCheckpoint = CheckpointsRanks[currentCheckpoint]; if (!isMultiplayer) { checkpointsPassed++; GameFlowManager.RankRacers(isMultiplayer); } else { if (this.GetComponent <PhotonView>().IsMine) { int checkpointsPassedMP = (int)PhotonNetwork.LocalPlayer.CustomProperties["checkpointsPassed"]; checkpointsPassedMP++; Hashtable hash = new Hashtable(); hash.Add("checkpointsPassed", checkpointsPassedMP); PhotonNetwork.LocalPlayer.SetCustomProperties(hash); GMMP.RankRacers(); } } } }