How can I grab a game's thumbnail ingame?

So basically, I was making a game advertiser kind of thing, but I need it so it grabs the thumbnail and puts it ingame to a decal or something. How can I do this?

1 Like

If the game you want to grab is static, such as you already know what game you need to grab, simply put the game thumbnail in your images folder under Game Explorer.

For dynamically speaking, I myself am not well-versed in lua quite yet so I can’t help you with that.

You can use this link https://www.roblox.com/asset-thumbnail/image?assetId=GAMEIDHERE&width=768&height=432&format=png.

4 Likes

There are many ways of doing this, whether you are using Decals, SurfaceGui(s), and/or ScreenGui(s). For 3D objects, I would use SurfaceGui(s) because it’s rather less limited than a plain Decal.

Here are some search links to better understand:

Decals - Documentation - Roblox Creator Hub

ScreenGui - Documentation - Roblox Creator Hub

SurfaceGui - Documentation - Roblox Creator Hub

To upload the Image(s): Go to Studio > Game Explorer > Image > RightClick > Insert > Image File

Thanks, sorry for the late reply.

I think he meant a way to grab a game’s thumbnail when someone “activates” the part with their game. You wouldn’t be able to insert the game ID into your game beforehand because you don’t know the game ID. PeteMeCool had the solution which was the Game thumbnail link.

By the way, is there also a way to grab the title of it too?

local marketplaceService = game:GetService("MarketplaceService")

local isSuccessful, info = pcall(marketplaceService.GetProductInfo, marketplaceService, GAMEIDHERE)
if isSuccessful then
    print(info.Name)
end

You should look up your questions before you post them to see if they have already been answered, I found this with a couple minutes of research.