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

Developer Product? [ERROR]

Asked by
Hybric 271 Moderation Voter
10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

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

Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago

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

0
Read the last line... HexC3D 830 — 10y
Ad

Answer this question