So i made this basic script for a GUI that makes a copy of an imagebutton and then makes 100 of them.
Script:
MaxItems = script.Parent.MaxItems ItemsAtm = script.Parent.ItemsAtm TextBox = script.Parent.Scroller['1'] for ItemsAtm = 2,MaxItems.Value do TextBoxClone = TextBox:Clone() TextBoxClone.Parent = script.Parent.Scroller TextBoxClone.Name = ItemsAtm print(ItemsAtm) end
the script works but whenever i do use it it sorts the numbers like: 1, 10, 100, 11, 12 ,... Image: https://imgur.com/a/JOlXh9U
is there a way that it could sort it properly from 1 to 100
if this is not clear please comment i find this hard to describe
Hello, your answer is pretty simple. ImageButton has a nice property called LayoutOrder. Just change this property based on the number you are at in your loop.