Hello again! After doing some research I butchered together a script that can detect winners of a round and display their usernames on a textlabel. It works just fine when detecting and displaying a single users name - but breaks when multiple players win.
This is the specific trouble area:
if #alivePlayers >= 1 then -- during a non-testing session this value is set to 2.
winEvent:FireAllClients()
local alivePlayerNames = {}
for _, p in pairs(alivePlayers) do
table.insert(alivePlayerNames, p.Name)
end
local winners = table.concat(alivePlayerNames, ',')
local statustext = 'Winners: '
for i, player in pairs(alivePlayerNames) do
statustext = statustext..player.Name -- error occurs here
if i ~= #alivePlayerNames then
statustext = statustext.. ', '
end
end
