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

What does MarketplaceService.Prompt?PurchaseFinished do and How Do i get it to work

Asked by 5 years ago
Edited 5 years ago
1local MarketplaceService = game:GetService("MarketplaceService")
2 
3MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
4    if isPurchased then
5        print(player.Name .. " bought an item with AssetID: " .. assetId)
6    else
7        print(player.Name .. " didn't buy an item with AssetID: " .. assetId)
8    end
9end)

I have this code in a script in serverscriptstorage but it wont print anything for some reason

1 answer

Log in to vote
1
Answered by 5 years ago

It probably won't print anything because it's in ServerStorage. Put it somewhere else like ServerScriptStorage. Also, in the code that you gave, you did not prompt a player the gamepass. I'm pretty new to MarketPlaceService, so I might be wrong.

Ad

Answer this question