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

Having trouble with handling more than one product purchase?

Asked by 6 years ago

I am having trouble creating a script that reward points after buying the developer product. The points are for a system I am using in-game that involves getting points via leaderstats. Whenever I try to add more than one ProccessReceipt, only the last one I added works.

Heres the code I am trying:

001local MarketplaceService = game:GetService("MarketplaceService")
002local DataStoreService = game:GetService("DataStoreService")
003 
004local currencyName = "A.P"
005 
006local PreviousPurchases = DataStoreService:GetDataStore("PreviousPurchases")
007 
008local bit_ap = 443047981
009local some_ap = 443047297
010local pocket_ap = 443047667
011local hand_ap = 443046726
012local lot_ap = 443048522
013local heart_ap = 443049632
014local insane_ap = 443051526
015 
View all 266 lines...

And I know its not the gui's either. Please help, thanks!

0
Hecc, I ain't reading 266 lines Rare_tendo 3000 — 6y
0
Thanks! TheDeepH4x0r 20 — 6y
0
ProcessReceipt should be set once. Others will just override what you have. Tables are key to beaing able to process multiple dev products. User#5423 17 — 6y

Answer this question