How to deal with transform.parent in Pun

Options
I have a game in which players must jump on a platform, to get ahead in the game, this game is online, and I'm using Pun 2 in my project, I created a script that makes the platform move from side to side the other, and this platform also has two boxCollider, the boxCollider from the bottom is normal, but the top one is with (IsTrigger) enabled, in the script of this platform there is the function OnTriggerEnter (), this function makes it the parent platform of the object that collided, with that the related object goes where the platform goes, and the function OnTriggerExit () makes the relationship null. Everything works normal when it comes to the local player, but for other clients it doesn't work, it doesn't sync, and I don't know if I need to use some kind of call with RPC or use OnPhotonSerializeView (), I have no idea, thank you in advance can answer. below is my script.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class PlataformaMovel : MonoBehaviourPun
{
public Transform[] points;
public float speedy;
int current = 0;
float speed_Rel;
float ray =1;
void Update()
{
//moviment platform
if (Vector3.Distance(points[current].transform.position,transform.position)<ray)
{
current++;
if (current >= points.Length)
{
current = 0;
}
}
transform.position = Vector3.MoveTowards(transform.position,points[current].transform.position,speedy);
}
private void OnTriggerEnter(Collider other)
{
//parent
other.transform.parent = transform;
}
private void OnTriggerExit(Collider other)
{
// parent null
other.transform.parent = null;
}
}