My UIListLayout is not organizing numbers as it should. I currently have 10 buttons in a frame and the order for some reason goes 1, 10, 2, 3… because it’s not putting ten in the right place.
How do I fix this? 10 is appearing after 1 and there’s no other way to fix it even with “SortOrder” as “LayoutOrder” because even the layout order will put ten after one when I restart studio.
This is the expected behavior. When sorting alphabetically, 10 sorts before 2, just like BA sorts before C.
If you want to sort it with a number, set the sort order to LayoutOrder then set the LayoutOrder property on the text labels to be in increasing order. This property is numeric, so it handles numbers in the way you would expect.
You could use SortOrder to name and have the same effect by reversing numbers. Basically you need to make sure that every number is 3 characters long, so 1 becomes 001, 2 becomes 002, 10 becomes 010, and 99 becomes 099. This is the way that roblox sorts stuff, so if you just do that then it would work.