Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How should you return Purchase granted?

Asked by 4 years ago

This was my way of doing it but i was wondering if this was wrong because

I hadn't seen many tutorials do this

MarketplaceService.ProcessReceipt = function(ReceiptInformation)

    local Player = Players:GetPlayerByUserId(ReceiptInformation.PlayerId)

    if not Player then
        return Enum.ProductPurchaseDecision.NotProcessedYet

    elseif Player then
        local Handler = productFunctions[ReceiptInformation.ProductId]

        return Enum.ProductPurchaseDecision.PurchaseGranted
    end

end

most people and videos i saw did this


MarketplaceService.ProcessReceipt = function(ReceiptInformation) local Player = Players:GetPlayerByUserId(ReceiptInformation.PlayerId) if not Player then return Enum.ProductPurchaseDecision.NotProcessedYet end return Enum.ProductPurchaseDecision.PurchaseGranted end

i was wondering why

Answer this question