I'm not really sure how I can fix this without breaking the script I have... My UI GridLayout is lining things up by name which means if I have TextButtons named Item1 - Item25 its will line up like this... https://gyazo.com/805ff1f14c19c08ed9f387dce6c7f4b3
But If I change that then it will break my script:
script.Parent.ClickDetector.MouseClick:connect(function(Player) local items = Player.PlayerGui.InventoryGui.Frame.Inventory.Inventory for i = 1, 25 do local itm = items:FindFirstChild('Item' .. tostring(i)) if itm.ItemNumber.Value == 0 then itm.ItemNumber.Value = script.Parent.ItemId.Value itm.Image = script.Parent.PicId.Value break end end end)
Anyone have a suggestion?
Use a value inside of them and change the script to use the value instead of name ( =