When I try prompting a clothing item purchase (from Avatar Shop), it says “This item is not currently for sale”.
local man = script.Parent
local shirt = man:FindFirstChild("Shirt")
local pants = man:FindFirstChild("Pants")
local top = man:FindFirstChild("ShirtT")
local bottom = man:FindFirstChild("PantsT")
local topT = top:FindFirstChild("ClickDetector")
local bottomT = bottom:FindFirstChild("ClickDetector")
local shirtID = string.sub(shirt.ShirtTemplate, 33)
local pantsID = string.sub(pants.PantsTemplate, 33)
bottomT.MouseClick:Connect(function(player)
game:GetService("MarketplaceService"):PromptPurchase(player, pantsID)
end)
topT.MouseClick:Connect(function(player)
game:GetService("MarketplaceService"):PromptPurchase(player, shirtID)
end)
This is because when you input an ID of any clothing asset into the ShirtTemplate/PantTemplate it sets the value to it’s AssetId, this is different from the catalog id which would be used to prompt purchases.