Updating Game pass Image

Hey Developers,

I am trying to make an image button where it will put the image of the game pass automatically so I don’t have to do it manually. Here is my current script:

local Market = game:GetService("MarketplaceService")
local id = 000000 -- yes, I have my real gamepass id here

script.Parent.Image = Market:GetProductInfo(id,Enum.InfoType.GamePass).IconImageAssetId

when I try to test it it just turns blank and does nothing.

Market:GetProductInfo(id,Enum.InfoType.GamePass).IconImageAssetId will return a number value, and has to manually be converted into a rbxassetid://.

Try replacing your bottommost string with this:

script.Parent.Image = 'rbxassetid://'..Market:GetProductInfo(id,Enum.InfoType.GamePass).IconImageAssetId