Hello everyone. I have created my own custom donation board that runs from a value inside a player. It all worked just fine until the other day. What it is supposed to do is when someone buys a product, they get + the product amount they bought. Here is the script:
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1065521465 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 10
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1065521573 then
print("got reciept")
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 100
print("gave updates")
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1150510633 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 50
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1065521699 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1150463645 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 5000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1150512215 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.donations.money.Value = player.donations.money.Value + 10000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
Nothing happens, I have tried putting prints, but nothing. Is there anything that went wrong?
Thanks,
Drew