SetActive a gameObject over RPC

Hi,

I’m stuck for a while on this : I try to send a RPC on a GameObject to say “hey SetActive your child!” but it doesn’t work in other players screen.

My code is like this :

public Transform theTransformOfMyChild;
GetComponent().RPC(“ActiveThisThing”, RPCMode.All);
[RPC]
void ActiveThisThing ()
{
theTransformOfMyChild.gameObject.SetActive(true);
}

NetworkView are on the object wich have the script, I try to set it to observe the script, the transform, "unreliable and all the other way but nothing worked !

My RPCs work fine for instantiation but not for SetActive, Is that normal ?

Please I need HELP …

Ok, i’ve made a simple test with a cube to appear and it works great, so there’s a problem in my script.
If someone find something weard, there it is :

public int currentWeapon = 0;
public int maxWeapons = 2;
public Transform WeapA;
public Transform WeapB;
public Transform WeapC;
public NetworkView nView;

// Use this for initialization
void Start () {

SelectWeapon (0);
nView = GetComponent ();

}

// Update is called once per frame
void Update ()
{

if (Input.GetAxis (“Mouse ScrollWheel”) < 0)
{
if (currentWeapon + 1 <= maxWeapons)
{
currentWeapon ++;
}
else
{
currentWeapon = 0;
}
SelectWeapon (currentWeapon);
}
else if (Input.GetAxis (“Mouse ScrollWheel”) > 0)
{
if (currentWeapon - 1 >= 0)
{
currentWeapon–;
} else {
currentWeapon = maxWeapons;
}
SelectWeapon (currentWeapon);
}
if (currentWeapon == maxWeapons + 1)
{
currentWeapon = 0;
}
if (currentWeapon == -1)
{
currentWeapon = maxWeapons;
}
if (Input.GetKeyDown (KeyCode.Alpha1))
{
currentWeapon = 0;
SelectWeapon (currentWeapon);
}
if (Input.GetKeyDown (KeyCode.Alpha2))
{
currentWeapon = 1;
SelectWeapon (currentWeapon);
}
if (Input.GetKeyDown (KeyCode.Alpha3))
{
currentWeapon = 2;
SelectWeapon (currentWeapon);
}

}

void SelectWeapon (int index)
{
if (GetComponent().isMine){
for (int i = 0; i < transform.childCount; i ++)
{
//Activate the selected weapon
if ( i == index)
{

if ( transform.GetChild (i).name == "WeapA)
{
nView.RPC(“GetWeapA”, RPCMode.All);

}

if ( transform.GetChild (i).name == “WeapB”)
{

nView.RPC(“GetWeapB”, RPCMode.All);

}

if ( transform.GetChild (i).name == “BallOfPee”)
{

nView.RPC(“GetWeapC”, RPCMode.All);

}

}
}
}
}

[RPC]
void GetWeapA ()
{

WeapA.gameObject.SetActive (true);
WeapB.gameObject.SetActive (false);
WeapC.gameObject.SetActive (false);

}

[RPC]
void GetWeapB ()
{

WeapA.gameObject.SetActive (false);
WeapB.gameObject.SetActive (true);
WeapC.gameObject.SetActive (false);

}

[RPC]
void GetWeapC ()
{

WeapA.gameObject.SetActive (false);
WeapB.gameObject.SetActive (false);
WeapC.gameObject.SetActive (true);

}
}