Script not working

Hi,
I’m making a game loop.
I’m getting a stupid error though. I have no idea why.
Here is where it’s happening:

	if #Winners > 0 then
		
			Status.Value = "Winners: "..table.concat(Winners,", ")
			
		else
			
			Status.Value = 'No Winners!'
			
		end

I’m getting an error on the line where it says table.concat.
Why? Thanks for any help!

It would help if you show the exact error instead of just “error” and additionally mind showing the table Winners

local Winners = {}

Events.AddWinner.Event:Connect(function(Player)
	if not table.find(Winners,Player) then
		table.insert(Winners,Player)
	end
end)

You can’t put player data in tables(you can but then you get errors with table.concat), try putting their names instead

local Winners = {}

Events.AddWinner.Event:Connect(function(Player)
	if not table.find(Winners,Player.Character.Name) then
		table.insert(Winners,Player.Character.Name)
	end
end)
1 Like