Instantiating over the Network, good way?

Hello, I just wanted to ask if it’s good way to instantiate an object on a local player that needs also to be seen by other players across the Network? It works but I want to know if it’s correct way or is there any cleaner sollution :slight_smile:

private void Update()
{
  if(Input.GetKeyDown(KeyCode.F))
  {
    if(isLocalPlayer)
      {
        CmdCreateObj();
      }
  }
}

[Command]
void CmdCreateObj()
{
  RpcCreateAcross();
}

[ClientRpc]
void RpcCreateAcross()
{
  GameObject obj = Instantiate(instantiating stuff);

}

hi…as of my knowledge we can send int,float,string,networkplayer,networkmessages through in rpc’s. better to use NetworkServer.Spawn(). it can help you.

 GameObject obj = GameObject.Instantiate(prefab); // server-side copy
     NetworkServer.Spawn(obj); // send spawn message to clients

and once see this 1 it can help you.