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?

1 comment
Thats just how roblox is. This will not effect your script.