Clothing prompt purchase not working

When I try prompting a clothing item purchase (from Avatar Shop), it says “This item is currently not 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)

Wrong category, this should go in #help-and-feedback:scripting-support.

That usually means your shirt/pants aren’t on sale. double check if it is the correct id, and if it is on sale.

1 Like