How to verify a decal ID

Hello. I am making a gui that you put an ID into, and I want to know how to make sure that the ID is a decal.

You can use the MarketplaceService:GetProductInfo() to check if the asset is a decal, using AssetTypeId (a decal has the ID of 13, you can find the list of asset IDs here), make sure to wrap it in a pcall since if they enter an incorrect ID this will create an error

1 Like

Thanks! Now the problem is, that the decal Id is not showing up because it isnt the image id. I don’t know how to get the decals image id.

maybe then check for an asset id 1 image

1 Like

So this question has indeed been asked many times. Roblox has yet to add a proper solution even though their engineers have the time to give a hotfix…

The best solution people have found is using this code snippet


You would put use that snippet as such

local Decal = 1
Photo.Image = ""..Decal.."&width=420&height=420&format=png"

You sacrifice picture quality but it’s a lot better than the other method which is spamming GetProductInfo.

if tonumber(TextBox.Text) then
	local imageId = tonumber(TextBox.Text)
	ImageLabel.Image = ""..imageId.."&width=420&height=420&format=png"
1 Like