MarketplaceService failing to return Icon/Image ID

Hello. I’m attempting to use the MarketplaceService to retrieve the Icon/Image ID for a hat on the Avatar Shop to use in an ImageLabel.

However, when I attempt to retrieve the ID, it only returns a value of ‘0’. Other information such as the Name, Price in Robux, and Description can be retrieved flawlessly.

local mps = game:GetService("MarketplaceService")
while true do
	local itemvalue = script.Parent.CurrentItem.Value
	local item = mps:GetProductInfo(itemvalue)
	--update icon
	script.Parent.ItemIcon.Image = item.IconImageAssetId
	wait(0.01)
end

I’ve tried getting the Icon ID by replacing the ‘itemvalue’ variable with the ID of the item manually, but this only resulted in the same problem. I’ve also tried using other hats.

For reference, the value of the ‘itemvalue’ variable is 1028606, and is in an integer format, not a string format. It should be returning an image of the Red Baseball Cap.

You need the other parameters: MarketplaceService:GetProductInfo (roblox.com)

1 Like

What are you trying to get the GetproductInfo? IconImageAssetId is only for Developer Products and Gamepasses, i’m not sure if this’ll work, but maybe try this for setting the image?

script.Parent.ItemIcon.Image = "rbxthumb://type=Asset&id="..item.AssetId.."&w=150&h=150"
2 Likes