I’m trying to put the tool’s name onto the inventory GUI, but I don’t know how. The GUI only displays image IDs, not text. I’ve tried replacing the Image GUI with a text label and naming it Tool, but that doesn’t seem to work. I did find these lines of code, and I think their function is to put the tool’s name there if a text label’s name is detected to be Tool, but it doesn’t seem to work.
function create() – creates all the icons at once (and will only run once)
local toShow = #inputOrder -- # operator can only be used with an array, not a dictionary
local totalX = (toShow*iconSize.X.Offset)+((toShow+1)*iconBorder.x)
local totalY = iconSize.Y.Offset + (2*iconBorder.y)
frame.Size = UDim2.new(0, totalX, 0, totalY)
frame.Position = UDim2.new(0.5, -(totalX/2), 1, -(totalY+(iconBorder.y*2)))
frame.Visible = true -- just in case!
for i = 1, #inputOrder do
local value = inputOrder[i]
local clone = template:Clone()
clone.Parent = frame
clone.Label.Text = value["txt"]
clone.Name = value["txt"]
clone.Visible = true
clone.Position = UDim2.new(0, (i-1)*(iconSize.X.Offset)+(iconBorder.x*i), 0, iconBorder.y)
clone.ImageTransparency = unequipped
local tool = value["tool"]
if tool then
clone.Tool.Image = tool.TextureId
end