Whenever I purchase the skip stage DevProduct in my game this script doesn’t seem to work. There are no errors apart from the print at the end saying error so all I know is the problem is in the If statement
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
print("Not a player purchasing")
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receiptInfo.ProdcutId == 1358421415 then
print("Player Purchased Skip Stage!")
player.leaderstats.Stage.Value += 1
wait(1)
player:LoadCharacter()
return Enum.ProductPurchaseDecision.PurchaseGranted
else
print("error")
end
end
All help would be appreciated thank you!