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: Dev product money giver not stacking?!

Previous Thread :: Next Thread 
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:03 PM
It works, if I buy 100 coins, it gives 100 coins, if I buy it again, it adds another 100 and goes up to 200.

But if I buy 100 coins, and then 1000 coins, it gives 100, but doesnt add the 1000.

How do I fix this?

I couldn't give script because it's tagged. RIP
Report Abuse
Technomantic is not online. Technomantic
Joined: 14 Oct 2017
Total Posts: 161
09 Nov 2017 06:05 PM
Does it give you an error?
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:07 PM
No, it's not really an error though.

It doesn't want to add 1000 coins after adding 100 coins


The 100 coins and 1000 coins are different dev products btw
Report Abuse
Technomantic is not online. Technomantic
Joined: 14 Oct 2017
Total Posts: 161
09 Nov 2017 06:12 PM
Does it work if you do 1000 and then 1000 again?

Does it work if you do 1000 and then 100, instead of the other way around?
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:14 PM
1000, and then 1000 works

1000 and then 100 doesn't work

I'm sure it has something to do with them being different dev products.
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:15 PM
I also just noticed, testing it again, it's not even working now, it works sometimes and doesn't work other times.
Report Abuse
Technomantic is not online. Technomantic
Joined: 14 Oct 2017
Total Posts: 161
09 Nov 2017 06:17 PM
If they both work individually there's probably something in your code unintentionally preventing you from using a different DevProduct after getting a certain one already. This could be an if statement or some other thing.
We can only speculate since we can't see your code Can you upload your script somewhere else that we can read it and then link it to us, since it will be censored here?
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:20 PM
There are different scripts in ServerScriptService, one for 1000, one for 100.

And then there are different textbuttons with localscripts in them, one for 1000, one for 100.

I was told that they need to be in seperate scripts though.
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:22 PM
local MarketplaceService = game:GetService("MarketplaceService")
local devproductid = 113778864
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:23 PM


MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == devproductid then

Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:27 PM
player dot leaderstats dot Coins dot Value = player dot leaderstats dot Coins dot Value + 1000


dot = .




Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:28 PM
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
Report Abuse
R4mastered is not online. R4mastered
Joined: 15 Aug 2014
Total Posts: 94
09 Nov 2017 06:32 PM
Thats the script in ServerScriptService. ^^^^^^^
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