Basically as it says above I am trying to create a list of all the players in my game so I can create a scoreboard. They all have the “Player” tag and my idea is to have a script go and find all objects with that tag, add them to a list, and display the list. But I can’t seem to get the list to populate.
EDIT: Added my current broken code
public GameObject[] players;
void Start()
{
if (players == null)
players = GameObject.FindGameObjectsWithTag("Player");
foreach (GameObject player in players)
{
players.Add(player);
}
}