Product script not working

I was testing out my game on DevProduct, but It does not seems to work. I tried on my other games work but this doesn’t. Here is the script-

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

MarketplaceService.ProcessReceipt = function(receiptInfo)
	if receiptInfo.ProductId == 1071863336 then
		local Player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
		if Player then
			repeat wait() until workspace:FindFirstChild(Player.Name) -- Just for safety.
			local Character = workspace[Player.Name]
			Player.leaderstats.Stage.Value += 1
			return Enum.ProductPurchaseDecision.PurchaseGranted
		else
			return Enum.ProductPurchaseDecision.NotProcessedYet
		end
	end
end
script.Parent.MouseButton1Click:Connect(function()
	if game.Players.LocalPlayer.leaderstats.Stage.Value < 90 then
		game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer,1071863336 )
	else
		script.Parent.Text = "You are at the maximum stage."
		wait(2)
		script.Parent.Text = "Skip Stage"
	end
end)

Let me know if you know any solution!

Did you test it in a normal server?

I don’t want, lol. I don’t have that much robux like you

Does the DevProduct even exist?

Why are you checking for the Character when you don’t even use the variable?

Yeah, It’s a skip stage devproduct

Is this applied to all the games you’ve tested the code at?

Well, you want the player to teleport to the next stage too.

Can you send the game link that this post is associated to?

Nope, But I tried removing this, and It doesn’t work.

MarketplaceService.ProcessReceipt = function(receiptInfo)

have you tested to see if the event is firing, like a print statement?

It should work, I have seen that line multiple times.

Yeah, I did, But it doesn’t print out anything. But for the other game, It prints out perfectly

Is the HTTPs Requests Enabled on?

Did you send of the hole script?
Is there another ProcessReceipt in a another script?

Yeah I turned that on to make it same as the other game

HttpService is not required for developer products.

No that’s the only one. And btw I didn’t made the script

I am not sure about this but if you have another ProcessReceipt in your game roblox will only fire one

Try doing Ctrl + Shift + F and type in ProcessReceipt and let us know if there are more than one results.

1 Like