So uh… I’m trying to make a code that orders the players greatest to least, based on how many eggs they collect. The intvalue is called EggCount, and is stored inside the player. The error message is “attempted to index a number with a number”. I’m just confused right now.
for i,v in ipairs(Players:GetChildren()) do
v = {v,v.EggCount.Value}
table.sort(v, function(a,b)
print(v)
return a[2] > b[2]
end)
end
Any help would be appreciated, I’m going on vacation in 3 hours, so I might take a while to check in.