Can anyone tell me why this is processing the receipt, but failing to load the character? Thanks.
local MPS = game:GetService("MarketplaceService")
local function processReceipt(receiptInfo)
if receiptInfo.ProductId == 961264618 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
--player left game
return Enum.ProductPurchaseDecision.NotProcessedYet
end
print(player.Name.." just bought "..receiptInfo.ProductId)
player:LoadCharacter()
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
MPS.ProcessReceipt = processReceipt()