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

Error At Handling Transactions [DataStore]?

Asked by 8 years ago
01local MarketplaceService = game:GetService("MarketplaceService")
02local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
03local productId = 29974967
04 
05MarketplaceService.ProcessReceipt = function(receiptInfo)
06 
07    for i, player in ipairs(game.Players:GetChildren()) do
08        if player.userId == receiptInfo.PlayerId then
09 
10 
11            if receiptInfo.ProductId == productId then
12 
13                player.Gems.Value = player.Gems.Value + 5
14            end
15        end
View all 22 lines...

I do not use a leaderstats model (I put the variables in the player directly) and no errors in output, it keeps giving me an error when I try to purchase the dev. Product.

Answer this question