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?
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.
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.