I want to make a player list like in minecraft that sorts the lists by rank, which means the higher rank the higher you are on lb. And if 2 people have the same rank then they are sorted by alphabetic too.
Then you would have to implement custom sort logic
like,
dictionary[firstLetter] = additionalLayoutOrder
and leave some space for the letters
like,
local rankLayoutOrder = {Owner = 0
Admin = 100
Moderator = 200}
… and so on
local alphabetLayoutOrder = {"a" = 0,
"b" = 1,
"c" = 2,
"d" = 3,
-- up until Z, and numbers 0-9
and then in the “Clone List Template” function
local new = template:Clone()
local firstLetterLowered = string.lower(string.sub(playerName, 1, 1))
new.LayoutOrder = rankLayoutOrder[rank] + alphabetLayoutOrder[firstLetterLowered]