I am trying to make the script print "done" when the purchase is done, just for testing purposes. I even tested the script live in a real game and still didn't print anything after the purchase was complete. Why? It shows no errors...
The Code
local Market = game:GetService('MarketplaceService')
local Ticket = 36931483
script.Parent.Touched:connect(function(plr)
if plr.Parent:FindFirstChild('Humanoid') ~= nil then
local player = game.Players:GetPlayerFromCharacter(plr.Parent)
Market:PromptProductPurchase(player, Ticket)
else
--nothing
end
end)
Market.PromptPurchaseFinished:connect(function(player, Ticket, isPurchased)
print('done')
print(isPurchased)
end)

1 comment
Why am I -2? Its correct.