How do I get a catalog ID from an asset ID?

I’m trying to make a clothing GUI and make it so if the shirt isn’t for sale, it says that it’s unavailable.
However, to do that I need to use marketplaceservice, which uses the ID from the catalog.
But I’m getting the shirt’s ID from the shirt object, which is an asset ID and not the same.

So how do I get the catalog ID from the asset ID thats in the shirt object?
Or is there another way to get product info?

3 Likes

Can you share an example of an ID you’re working with an ID you’re trying to retrieve?

Asset ID:
http://www.roblox.com/asset/?id=10590216069

Catalog ID:
https://www.roblox.com/catalog/10590216086/Respected

local Game = game
local Players = Game:GetService("Players")

local function OnPlayerAdded(Player)
	local function OnCharacterAdded(Character)
		if not Player:HasAppearanceLoaded() then Player.CharacterAppearanceLoaded:Wait() end
		local Humanoid = Character:FindFirstChildOfClass("Humanoid")
		if not Humanoid then return end
		local HumanoidDescription = Humanoid:GetAppliedDescription()
		print(HumanoidDescription.Shirt, HumanoidDescription.Pants, HumanoidDescription.GraphicTShirt)
	end
	
	Player.CharacterAdded:Connect(OnCharacterAdded)
end

Players.PlayerAdded:Connect(OnPlayerAdded)

You can retrieve the direct catalog IDs from a character’s ‘HumanoidDescription’ instance.

Is there no other way of getting it? That would work for one part of the script but I’d also like to get it from a mannequin that doesn’t have a humanoid description.
Also sorry for the late reply.

if i’m not mistaken, NPC’s with a Humanoid will still have a Humanoid Description.

The problem is it’s one of those clothing store mannequins and they do not have a humanoid description, the other devs would need to fill it out manually each time they add one.
And they will probably forget to do that.

Did you even read what I said???

You don’t add a Humanoid Description manually, roblox adds it automatically…

Copy and paste this:

rbxassetid:// --(Your id here)

That’s an asset ID, it’s not the same as the catalog ID.