Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I rename these to keep is organized?

Asked by 7 years ago
Edited 7 years ago

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?

0
Thats just how roblox is. This will not effect your script. User#5423 17 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Use a value inside of them and change the script to use the value instead of name ( =

Ad

Answer this question