Get Image ID from a Decal ID in a script?

We have in-game player advertisements that are basically billboards that players can put images on, but right now they can only put image IDs and they get really confused on why decal IDs don’t work… Is there a way to get the Image ID from the Decal ID they put in?

2 Likes

You can use InsertService:LoadAsset(assetId) for any situations where the Id property wants a different Id than the one provided in the URL of the asset. This stumped me for a while as well when I was trying to let people insert the ID’s of shirts and pants.

2 Likes

I think :LoadAsset only works for trusted/owned assets, so it would most likely error if a user tries to insert a decal from the Roblox library.

As far as I know, there isn’t a good way to do this at the moment.

2 Likes

As mentioned above, this doesn’t work (Roblox has trust issues). Did you manage to find a solution for this?

This endpoint maxes out at 420x420 so isn’t ideal: https://www.roblox.com/asset-thumbnail/image?assetId=26769281&width=420&height=420&format=png

6 Likes