I created a script so when you purchase a dev product it gives you 1,000 cash but when I purchase it, nothing happens. How would I fix this? Also, I'm not getting any errors.
local MarketplaceService = game:GetService("MarketplaceService")
local devproductid = 437840868
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductID == devproductid then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000
end
end
end
end

3 comments
Either try capitalizing the I in id and p in product because that has happened to me in some cases where I forgot to capitalize
yes, case does matter
it already is