This is to get the image of a developer product

local DeveloperProducts = game:GetService("MarketplaceService"):GetDeveloperProductsAsync():GetCurrentPage()

function GetProductImage(id) for _, Product in pairs(DeveloperProducts) do if Product.ProductId == id then print(Product.IconImageAssetId) return Product.IconImageAssetId end end end

item.Button.Image = GetProductImage(22527498)

Why does it print "string expected, got nil"?

1 comment

0

Please format you code in lua code block.