This part of the script is just supposed to create new image labels in a players inventory to showcase their items, it finds the item in pairs correctly but when it changes the image ID the image will not load and stays blank and gray.
for _,i in pairs(lp:WaitForChild("Inventory"):GetChildren()) do
local realitem = game.ReplicatedStorage.Items[i.Name]
local desc = script.Parent:WaitForChild("Inventory").Desc
local image = Instance.new("ImageLabel")
image.Name = i.Name
image.Image = "rbxassetid://"..realitem.ThumbnailId.Value --value of image obtained by number value
image.BorderSizePixel = 0
image.Parent = script.Parent.Inventory.Items