NOTE: This developer product is for more coins [player.leaderstats.coins]
ALSO THIS IS A SURFACE GUI BUTTON NOT SCREEN GUI
I made a developer product, bought it [for testing to see if work], Then I dont get any coins. Is there a solution of this?
I have it all I just need to know how to put the give the player coins part when bought.
PromptPurchaseFinished
Event should finish it of, if the player Buys The PromptPurchase and finishes it off.
As an example
local MS = game:GetService("MarketplaceService") MS.PromptPurchaseFinished:connect(function(player, assetId, isPurchased) for i = 1,1 do player:findFirstChild("leaderstats").coins.Value = player:findFirstChild("leaderstats").coins.Value +50 -- Change the value to whatever you want. end end)
(player, assetId, isPurchased)
The player, The Id of the game pass , and finally whether it's true or false.
This won't work if you used PromptProductPurchase()
in the beginning