Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Developer Product? [ERROR]

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.

1 answer

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)

MarketPlaceService Wiki

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

1 comment

0

Read the last line...

This discussion is preserved as it was. New answers, comments, and votes are closed.