Developer product working in studio but not in teamtest and neither in game

Hello fellow developers,

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!

Huh. Interesting. Can you show me the client and server code to process the dev product purchase?

1 Like

Yes ofcourse,

Server:

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)

I’m assuming skip stage is the problem (the dev product) and “Checkpoints” as a folder. Edit: If you know you know

character:MoveTo(game.Workspace.Checkpoints:FindFirstChild(Player.leaderstats.Stage.Value ).Position)
1 Like

Also were you on mobile? MouseButton1Click is used…

Hi there,

unfortunatly this is not the issue cause it works perfectly fine in studio testing but just doesn’t work in teamtest or a real game

maybe print() will help you solve the problem? Inside the if and else if statement receivedProductId

1 Like

Actually BEFORE the statements oops

Unfortunatly it still doesn’t print anything in the teamtest but it does print in roblox studio, really weird, starting to think its a roblox problem

1 Like

Does the prompt pop-up when you click the button though?

1 Like

absolutely, i just don’t understand why this isn’t working, very frustrating.

2 Likes