Excuse the very simple question, I have this old script in my game for creating a list of players ordered by number if points. I’ve forgotten how it works, but it works.
local function createPlayerTables()
for i,v in pairs(game.Players:GetChildren()) do
local points=v.Points.Value
local playertable={v.Name, points}
table.insert(playerPoints, playertable)
end
table.sort(playerPoints, function(a,b)
return a[2] > b[2]
end)
I am trying to figure out how to address the first item in the list (define the winning player) because I want to add a wins stat.
Thanks ![]()