How to make buttons sortorder like 1,2,5,10

Hello! I’m Giorno, and I’m making a game for my friend.

What’s the topic of the game?
The topic is pls donate copy.
And no, my friend doesn’t want to make it with real gamepasses. It’s an modified copy.

I want to achieve help that could make buttons not look like this:

I tried using UIListLayout, but it didnt helped.
I looked everywhere I can. YouTube, DevForum. Nothing helped me.

How it should look:

Name each button after it’s order, the first one would be called “001”, then “002”, etc.
Then set the UIListLayout’s SortOrder to “Name”.

1 Like
if cost < 100 then
	if cost < 10 then 
		clone.Name = "00"..cost
		clone.Name = "0"..cost
	clone.Name = cost

It should look like this?

Give each button a layout order of the cost it’s holding.

1 Like

I would do something like this…

--Choose how many digits you want to end up with.
--If the highest price you will have is 10000, you would set it to 5
local numberOfDigits = 5 = string.rep("0", numberOfDigits - #tostring(cost))..cost

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.