I recently came upon a very annoying issue, the problem is that when i test my developer products in studio they all work perfectly fine but when i go into a teamtest or a real game they don’t, i read about this issue in other forum posts and i checked the entire game if any other script was calling processReceipt and there wasnt any script doing that. Looking out for you guys responses cause this issue is very annoying.
Thanks for reading and hoping that we can fix this issue together!
local SkipStageProductID = 2954868975
local JumpscareProductId = 2954868991
local KillAllProductId = 2955140493
local resetAllProductId = 2955152709
local marketPlaceService = game:GetService("MarketplaceService")
local function handlePurchase(info)
local receivedProductId = info.ProductId
local Player = game.Players:GetPlayerByUserId(info.PlayerId)
if not Player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receivedProductId == SkipStageProductID then
local character = Player.Character
character:MoveTo(game.Workspace.Checkpoints:FindFirstChild(Player.leaderstats.Stage.Value ).Position)
return Enum.ProductPurchaseDecision.PurchaseGranted
elseif receivedProductId == JumpscareProductId then
game.ReplicatedStorage.JumpscareAll:FireAllClients()
return Enum.ProductPurchaseDecision.PurchaseGranted
elseif receivedProductId == KillAllProductId then
for _, player in ipairs(game.Players:GetPlayers()) do
if player ~= Player then
player.Character:BreakJoints()
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
elseif receivedProductId == resetAllProductId then
for _, player in ipairs(game.Players:GetPlayers()) do
if player ~= Player then
player.leaderstats:FindFirstChild("Stage").Value = 0
player.Character:MoveTo(game.Workspace.Checkpoints:FindFirstChild(tostring(0)).Position)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
end
marketPlaceService.ProcessReceipt = handlePurchase
Client:
local button = script.Parent
local player = game.Players.LocalPlayer
local marketPlaceService = game:GetService("MarketplaceService")
local id = 2954868975
button.MouseButton1Click:Connect(function()
marketPlaceService:PromptProductPurchase(player, id)
end)