Ive been searching for hours upon hours for a solution on this. I’m new to Unity Networking and I’m using Mirror to spawn a gameObject through the server to the clients. But the clients don’t see any object, its just the host that does. I need help.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
public class Cardinit : NetworkBehaviour
{
public Sprite[] CardSprites;
public List<GameObject> Cards = new List<GameObject>();
public GameObject Card;
public Sprite Back;
public override void OnStartServer()
{
Debug.Log("hi");
int i =0;
foreach(Sprite indSprite in CardSprites){
var NewCard = Instantiate(Card);
NetworkServer.Spawn(NewCard);
NewCard.name = indSprite.name;
NewCard.AddComponent<SpriteRenderer>().sprite = indSprite;
NewCard.GetComponent<SpriteRenderer>().sortingOrder = i;
NewCard.transform.localScale = new Vector3(0.25f,0.25f,0.25f);
NewCard.AddComponent<BoxCollider2D>();
NewCard.AddComponent<CardBehaviour>();
NewCard.GetComponent<CardBehaviour>().TwoSides.Add(Back);
Cards.Add(NewCard);
i++;
}
}
public bool draggedEmpty(){
foreach(GameObject card in Cards){
if(card.GetComponent<CardBehaviour>().selectedCard){
return false;
}
}
return true;
}
// Update is called once per frame
void Update()
{
}
}
