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

Reliable method of getting the Shirt or Pants ID? [solved]

So, with getting the ID from shirts or pants, it's usually Asset - 1, but not always. Is there a more reliable way of getting it than just subtracting 1? This is my script, but it doesn't load the clothing.

frame.btnPurchase.MouseButton1Click:Connect(function()
	if chosenId > 0 and player.WalletBalance.Value >= price then
		local assetSelect = game:GetService("MarketplaceService"):GetProductInfo(chosenId, Enum.InfoType.Asset)
		local itemType = ""
		
		if assetSelect.AssetTypeId == 11 then
			itemType = "shirt"
		else
			itemType = "pants"
		end		
		
		chosenId = assetSelect.AssetId - 1
	end
end)

1 answer

Just copy the id from roblox website, make a decal, paste id into texture from properties and it will give you the asset id

2 comments

0

But people who are non developers dont follow nor read the wiki which has the thing which tells u that decals need one to be subtracted

0

But I'm also getting the asset info. No big deal, I solved it.

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