Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I display a Gamepass Image? My script is displaying a model image instead...

p.GamepassImage.Image = "http://www.roblox.com/Thumbs/Asset.ashx?Width=420&Height=420&AssetID="..tostring(perk.ID)

I'm trying to display my gamepass image with my gamepass id, however it is displaying a totally different thing (free model image)

I think it's because roblox gamepass id were changed, any help please?

2 answers

✓ Accepted answer

You can use MarketplaceService:GetProductInfo(ID,2).IconImageAssetId. This will get the icon of the Gamepass

local market = game:GetService("MarketplaceService")
p.GamepassImage.Image = "rbxassetid://" .. market:GetProductInfo(ID,2).IconImageAssetId

Happy to help, b_mni

2 comments

0

Thanks, with your help I made p.GamepassImage.Image = "rbxthumb://type=GamePass&id="..tostring(perk.ID).."&w=150&h=150" and it worked!

0

ok thanks :)

I think you only can do that with decals. What I would do is upload the decal and then get it from there.

This discussion is preserved as it was. New answers, comments, and votes are closed.