I have been using this in game to prompt the purchase but what I would like to do is fire a GUI to open if the sale completed.
local shirtId = 0000000000 script.Parent.ClickDetector.MouseClick:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player, shirtId) end)
You can use MarketplaceService.PromptPurchaseFinished
to know when the player purchases a shirt that you prompted in-game.
local shirtId = 0000000000 script.Parent.ClickDetector.MouseClick:connect(function(player) local MarketplaceService = game:GetService("MarketplaceService") MarketplaceService:PromptPurchase(player, shirtId) MarketplaceService.PromptPurchaseFinished:Connect(function(buyer,assetId,isPurchased) if assetId == shirtId and buyer.UserId == player.UserId then -- Do something end end) end)