I don't know what is wrong. I have this in workspace in normal script. Scripts name: PurchaseHandler
local MarketplaceService = game:GetService("MarketplaceService") local Points1=278389550 --Id local PurchaseHistory = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == Points1 then player.leaderstats.Points.Value=player.leaderstats.Points.Value+100 end end end local playerProductKey = receiptInfo.PlayerId .. ":" .. receiptInfo.PurchaseId PurchaseHistory:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end
I am not sure if this would help, but on line 9 you didn't spell a word correctly! Its Value not Valu I think :D