I was doing a commission for making a shirt seller thing and for some reason I keep getting the same message when I buy a shirt using “PromptPurchase”?
It prints the correct shirt Id but nothing is still working and it’s a little hard to explain so I’ll just provide photos.
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ClothingToClient = ReplicatedStorage:WaitForChild("ClothingToClient")
script.Parent.ClickDetector.MouseClick:Connect(function(player)
local Id = script.Parent.Name
local IsShirt = script.Parent.IsShirt.Value
ClothingToClient:FireClient(player, Id, IsShirt)
end)
ClothingToClient.OnServerEvent:Connect(function(Player, Id)
print(Id)
MarketplaceService:PromptPurchase(Player, Id)
end)
I don’t think you can purchase shirts in-game, I think this holds true for pants too. I believe you can only prompt purchases for developer products and gamepasses in-game, but perhaps I’m wrong.
Otherwise, get the ID of your Shirt from Catalog/Avatar Shop (not Studio). Use that ID to sell instead BUT keep using your current shirttemplate ID for your shirttemplate.
If you charged players with the template id, then you may have made them bought the wrong item, as one texture id can be an asset id. Texture id and asset id are separate, so if you upload an asset and get the asset id 5, the texture id can be 2, and if you try to prompt players for id 2 you prompt them to buy asset id 2. Do you see what I mean?
@bt5191 You are fully able to prompt players to purchase shirts and pants in-game, you just have to specify the correct asset id . This is found in the URL on the page, for example - there, the asset id is 2726168898, and if you call MarketplaceService:PromptPurchase(player, id) with that asset id, it should work
(Keep in mind gamepasses are only listed because they used to be assets. Some still have an asset number associated under the old system or something.)
Edit: To clarify, texture id and pants id are separate, yes. Saying pants/shirt ids are asset ids is confusing here because the texture id is an asset, just not the one you’re looking for.