public override void TriggerEnter(PhysXCollider other) { // we only call Pickup() if "our" character collides with this PickupItem. // note: if you "position" remote characters by setting their translation, triggers won't be hit. // get gunner and driver id of pickup people. // execute if the driver id is mine or if I am the master client and driver id < 0 if (PhotonNetwork.IsMasterClient) { NetworkPlayerVehicle npv = other.GetComponentInParent <NetworkPlayerVehicle>(); if (npv != null && !npv.GetComponent <VehicleHealthManager>().isDead) { if (this.SentPickup) { return; } int gunnerID = npv.GetGunnerID(); int driverID = npv.GetDriverID(); HotPotatoManager hpm = other.gameObject.GetComponentInParent <HotPotatoManager>(); if (hpm.canPickupPotato) { SentPickup = true; GetComponent <PhotonView>().RPC(nameof(PickupPotato_RPC), RpcTarget.All, driverID, gunnerID, npv.teamId); } } } }