Getting Gamepass icon not working

Im tying to get a gampass icon with a script but its not working I get an error how can I fix this?

Thanks!

Marketplace = game:GetService("MarketplaceService")

local PassInfo = Marketplace:GetProductInfo(7958432, Enum.InfoType.GamePass).IconImageAssetId

script.Parent.Image = PassInfo
10:55:29.745 - Image "" failed to load: Unexpected URL
  10:55:34.246 - Image "4584238988" failed to load in "Players.Gatuno7000.PlayerGui.InsertedIcons.ImageLabel.Image": Unexpected URL
1 Like

PassInfo is only the id while Image property requires that format rbxassetid://0000000

script.Parent.Image = "rbxassetid://"..PassInfo
1 Like

By the way, you are able to load the thumbnail of a game pass icon simply by using the thumbnail content id. For your specific game pass, you will be using rbxthumb://type=GamePass&id=7958432&w=150&h=150.

4 Likes