Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

MarketplaceService.PromptPurchaseFinished doesn't get fired. How to resolve this?

Asked by 5 years ago

When a user purchases a developer product I wan't the work "o" to be printed into the console.

When I add a callback to MakretplaceService.PromptPurchaseFinished It doesn't do anything...

Here's my Lua code:

game:GetService("MarketplaceService").PromptPurchaseFinished:Connect(function(Player, ProductId, Purchased)
    print("o") -- o isn't printed to the console even when someone has purchased something from Marketplaces's PromptProductPurchase.
    if not Purchased then
        wait()
        game:GetService("ReplicatedStorage").Notifacation:FireClient(Player, "Error", "Purchase failed!")
    end
end)

How can I resolve this?

Answer this question