Hi Guys, so I was trying to use MarketplaceService, but the ProcessReceipt isn’t working in Team Test inside Studio for some reason.
Script -
MS.ProcessReceipt = function(receipt)
local success, err = pcall(function()
local player = game.Players:GetPlayerByUserId(receipt.PlayerId)
print(receipt.ProductId) -- this also doesn't print even I got the prompt
if receipt.ProductId == 1358881369 then
print("Fired") -- this also doesn't work
bindables.ChangeData:Fire("Skips1", player, 1, 1)
elseif receipt.ProductId == 1361212065 then
bindables.ChangeData:Fire("Skips5", player, 1, 5)
elseif receipt.ProductId == 1361212655 then
bindables.ChangeData:Fire("Skips10", player, 1, 10)
elseif receipt.ProductId == 1361268917 then
bindables.ChangeData:Fire("Skips100", player, 1, 100)
end
end)
if success then
return Enum.ProductPurchaseDecision.PurchaseGranted
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end
Is there any problem in my script or something else? Any help is appreciated. Thanks!
EDIT: It’s weird that nobody knows the fix of this.
Hello!
I can’t seem to find your issue, but I am sure of a structure that works. You can find it here - This is the official script on the Roblox documentation.
Just scroll down a bit to find it.