generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why isn't this working?

Previous Thread :: Next Thread 
heroesp is not online. heroesp
Joined: 23 Feb 2011
Total Posts: 3214
26 Jun 2016 03:32 AM
local productId = 35587367 -- change to your developer product ID
local player = game.Players.LocalPlayer
local isPurchased = true

script.Parent.MouseButton1Click:connect(function(buy)
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end)

game:GetService("MarketplaceService").PromptPurchaseFinished:connect(function(player, assetId, isPurchased)
if isPurchased then
game.player.leaderstats.Money.Value = game.player.leaderstats.Money.Value +500
print(player.Name .. " bought an item with AssetID: " .. assetId)
else
print(player.Name .. " didn't buy an item with AssetID: " .. assetId)
end
end)


#ECSMasterRace R$7,860 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471
Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
26 Jun 2016 06:26 AM
Because you didn't read the wiki.

http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService
Report Abuse
heroesp is not online. heroesp
Joined: 23 Feb 2011
Total Posts: 3214
26 Jun 2016 01:55 PM
^ thanks for your help bud
bump


#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471
Report Abuse
landon90 is not online. landon90
Joined: 26 Dec 2008
Total Posts: 1847
26 Jun 2016 01:57 PM
Is this in a GUI? I can just give you the script that I use because I was having issues for a while and finally got it to work.


Report Abuse
heroesp is not online. heroesp
Joined: 23 Feb 2011
Total Posts: 3214
26 Jun 2016 01:58 PM
^ Yeah. Not sure why it's not working.


#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471
Report Abuse
heroesp is not online. heroesp
Joined: 23 Feb 2011
Total Posts: 3214
26 Jun 2016 02:22 PM
bump helpppppppp


#ECSMasterRace R$8,350 | https://www.roblox.com/Trade/TradeWindow.aspx?TradePartnerID=14976471
Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
26 Jun 2016 07:45 PM
This wiki page has all the info you need on it:

http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService

"PromptProductPurchase" is for developer products.

http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptProductPurchase


"PromptPurchaseFinished" Is for assets only.

http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchaseFinished


Use ProcessReceipt to process developer product purchases.


http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/ProcessReceipt


Please read the wiki before asking questions and denying help.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image