local Mks = game:GetService("MarketplaceService")
Mks.ProcessReceipt = function(Ids)
local Player = game.Players:GetPlayerByUserId(Ids.PlayerId)
require(DevProducts[Ids.ProductId])(Player) -- A module script with the function that actually gives the gamepass, not important.
return Enum.ProductPurchaseDecision.PurchaseGranted
end
I prompted the purchase from a local script with PromptProductPurchase.
This happens with and without me returning the purchase granted enum.
It discusses everything about Developer Products, as well as specific functions and how to handle the purchases. There’s some sample code you can look at as a reference.
I think you should use a pcall. If you don’t know what a pcall function is,
local success, error = pcall(function()
--- type developer product information here
end
if success then
print("Sucessfully Working!")
else
print(error)
With this way, you can successfully track the error you are facing in game by prompting the purchase, then when it shows the error. Then, go to in-game developer logs and check what error message it has.
Also, track the error it made and learn from it by searching up, “Error Messages” on roblox. Forgot the link to it though so