The ProcessReceipt datastore conditional is throwing an error, halting the entire codeblock.
It’s requiring information to be pulled from a datastore that doesnt exist yet, and if it doesnt exist, it halts the rest of the code which is SUPPOSED to run. You havent set the purchasehistorystore, therefore how can you expect a true value to come out of it?
I made this change in my own code because it wasn’t getting passed this point and I quickly realized the problem.
Here’s a direct link to what i’m referencing: MarketplaceService | Documentation - Roblox Creator Hub
-- If purchase was recorded, the product was already granted
if success and purchased then
return Enum.ProductPurchaseDecision.PurchaseGranted
else
error("Data store error:" .. errorMessage)
end
this if statement should be replaced with this:
if success and purchased then
return Enum.ProductPurchaseDecision.PurchaseGranted
elseif not success then
error("Data store error:" .. errorMessage)
end