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

How do I fix this code for developer product purchase?

Asked by 4 years ago

I have tried making a Donation dev product. This is the code that I want to run when at least one of the products have been bought. Any solution? Thanks.

01local MarketplaceService = game:GetService("MarketplaceService")
02local DataStoreService = game:GetService("DataStoreService")
03local Players = game:GetService("Players")
04 
05local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")
06 
07local productFunctions = {}
08productFunctions[1082181820] = function(receipt, player)
09    game.ReplicatedStorage.Rem_Events.DonationReceived:FireAllClients(player, "10")
10        return true
11    end
12productFunctions[1082181849] = function(receipt, player)
13        game.ReplicatedStorage.Rem_Events.DonationReceived:FireAllClients(player, "50")
14        return true
15end
View all 71 lines...
0
Is this your whole code? User#30567 0 — 4y
0
Yes, what it does when the product has been purchased. WoofWoofWatermelonYT 16 — 4y
0
Does it even make people purchase the product User#30567 0 — 4y

Answer this question