Hi,
I’m trying to create a player GUI counter that illustrates the number of Contestants in the round. However, I can’t seem to find a way past an error - “Attempt to index nil with ‘Value’”. The print statement can perform the definition of this calculation, but the next line struggles with altering the IntValue I’ve set up.
Attached is an excerpt of my script:
local Contestants = {}
for i, v in pairs(game.Players:GetPlayers()) do
table.insert(Contestants,v)
end
print(#Contestants)
AgentCounter.Value = #Contestants