function AwardWinners()
print("Awarding winners...")
if #_G.winners > 0 then
for i,v in pairs(_G.winners) do
if v.PlayerGui.WinnerScript.Alive == true then
v.leaderstats.Points.Value = v.leaderstats.Points.Value + 5
table.insert(winnernames,v.Name)
end
end
MakeMessage(table.concat(winnernames,", ").." won!")
else
MakeMessage("Nobody won!")
end
end
that function is supposed to pull values from a table called "_G.winners" (which has players as it's values), get the name of them, put the names on a seperate table called "winnernames", and make a message that says what the names of the players on that table were.
but for some reason, even though there are values on winners, it just prints " won!".
Number of times opinion has changed: A lot. |