How to convert Asset Id to Image Id / Decal

Currently trying to make a shirt/pants giver. Apparently, Pants requires ImageIds instead of AssetIds. Is there any way to convert them?

The Pants/Shirt has a property named TemplateId, that Id corresponds to whatever asset ID that the image or a decal, or a shirt/pants have.

I’m not too sure what you mean by property. If this is a solution, can you show me an example?

try to use rbxthumb://type=Asset&w=150&h=150&id= if the asset id is not automatically resolving to the thumbnail id.

ex. rbxthumb://type=Asset&w=150&h=150&id=2866767072
image

Property is self-explanatory, the properties of the instance.

I had a similar thread to this. However, as you’re needing an ID for the .ShirtTemplate property, you’d use InsertService:LoadAsset(id) to get the template. Here’s a sample:

--Script in ServerScriptService
local assetId = 6632687231 --replace with your shirt id
local ins = game:GetService("InsertService") --obtaining service (Script only)

local shirtId = ins:LoadAsset(assetId):GetChildren()[1].ShirtTemplate
--as it returns a model, we extract the children, and get the property we need. As we're doing a shirt, .ShirtTemplate is used.
print(shirtId) --prints out as "http://www.roblox.com/asset/?id=6632687195"
--shirtId can now be used for the .ShirtTemplate property
1 Like