This script used to work about a month ago but now doesn't. I haven't changed it at all since then. It works on STUDIO with a test purchaseUI but not in game. Has Roblox updated something that I must change in this script? The game's output doesn't say anything in game nor does it say anything on studio.
donation1.MouseButton1Down:connect(function()
local productId = 45544657 -- DevProduct Id (GIVES 10 ROBUX)
MarketplaceService:PromptProductPurchase(player, productId)
MarketplaceService.ProcessReceipt = function(receiptInfo)
MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
wait(2)
thankYou.Visible = true
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == player.userId then
frame.LocalScript.MessageValue.Value = "[Server]: "..player.Name.." has just donated R$10!"
end
end
end)

1 comment
ProcessReceipt requires Enum.ProductPurchaseDecision.PurchaseGranted to be returned at some point.