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 » Scripting Helpers
Home Search
 

Marketplace Service not loading?

Previous Thread :: Next Thread 
Nynir is not online. Nynir
Joined: 04 Apr 2009
Total Posts: 2004
21 Oct 2014 02:37 PM
I'm working on a tycoon, and this dev product should add money. The purchase goes through, and the rest of the dev product script works, but this line doesn't. In the dev console I only get '100 cash'. I would appreciate any help you can give.

print('100 cash')
MarketplaceService.ProcessReceipt = function(receiptInfo)
print('loaded')
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
print('userid = receiptinfo')
if receiptInfo.ProductId == ID1 then
print('checking')
stats = player:findFirstChild("leaderstats")
cash = stats:findFirstChild("Cash")
print('found stats')
cash.Value = cash.Value + 100
print('money added')
end
end
end
local playerProductKey = "p_" .. receiptInfo.PlayerId .. "_p_" .. receiptInfo.PurchaseId
ds:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end

"Please murder him, because morality"
Report Abuse
Nynir is not online. Nynir
Joined: 04 Apr 2009
Total Posts: 2004
21 Oct 2014 02:48 PM
b

"Please murder him, because morality"
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
21 Oct 2014 03:01 PM
"cash.Value = cash.Value + 100"

Shouldn't you be getting 100?
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
21 Oct 2014 03:02 PM
When you took the freemodel script, you forgot to copy the whole script because you didn't define MarketplaceServer nor ID1.
Report Abuse
Nynir is not online. Nynir
Joined: 04 Apr 2009
Total Posts: 2004
21 Oct 2014 06:29 PM
First of all, that's my code. Secondly, that's where the problem is located In the code, that's not the entire code.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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