So making a short-term project. I got a lot of it don't and came across a roadblock im facing. How do I sort the players who have the most score to the least? Because if I sort the numbers I can't figure out the person who has the highest amount. This might be something simple, but I'm just too stupid to realize. Don't make fun of me :(
https://gyazo.com/eedb090bf0c705048a82820a0676bb54
Store all of the players scores into a table and rearrange them using table.sort()
local Scores = {} function setScores() for i, v in pairs(game.Players:GetPlayers()) do if v.Score then table.insert(Scores, v.Score) end end table.sort(Scores, function(a,b) return a > b end) end