Hi.
So I made this script. I can't seem to fix why this script is only displaying one player in the table.
The line that is displaying it is syn1:FireAllClients(table.concat(winners, ", ").." Have won!")
syn1 = game.ReplicatedStorage.RemoteEvent
plrz = game.Players:GetPlayers()
winners = {}
------------------------------------------------
while true do
for i = 5,0,-1 do
syn1:FireAllClients('Break: '..i)
wait(1)
end
-- Turning Value true
players = game.Players:GetPlayers()
for i = 1,#players do
players[i].Playing.Value = true
end
syn1:FireAllClients('Inserting Players into the game table...')
wait(2)
curplayers = game.Players:GetPlayers()
for i = 1,#curplayers do
if curplayers[i].Playing.Value == true then
table.insert(winners,curplayers[i].Name)
print('Added players')
for i = 10,0,-1 do
if #winners == 0 then
syn1:FireAllClients('Time up! No winners!')
wait(5)
else
syn1:FireAllClients(i)
wait(1)
end
end
if #winners == 0 then
syn1:FireAllClients('No winners. Good luck next time!')
else
syn1:FireAllClients(table.concat(winners, ", ").." Have won!")
end
wait(3)
for i=1, #winners do
table.remove(winners, 1)
end
end
end
end

1 comment
I might have fixed the issue but, I would still like to hear some responses.