Developer Products Error! Please Help!

  1. What do you want to achieve? A skip stage dev product!

  2. What is the issue? Include screenshots / videos if possible! The product works fine in studio but when I go to use it in game I get the error shown below!

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes. They all say to change to a server sided script and use only one script or create a new dev product. I have attempted all of these things, and still no help.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local skipId = 1321077107

local mps = game:GetService("MarketplaceService")

local plr = script.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if script.Parent.Parent.Parent.Parent.Parent.TempStage.Value < #game.Workspace.TowerSections:GetChildren() then
		mps:PromptProductPurchase(plr,skipId)
	end
end)

mps.ProcessReceipt = function(info)
	local productId = info.ProductId
	local plrId = info.PlayerId
	local plr = game.Players:GetPlayerByUserId(plrId)

	if productId == skipId then

		plr.TempStage.Value += 1
		plr:LoadCharacter()
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

Please note: the functionality of this works perfectly fine in studio. I cannot seem to get it working in the actual roblox application.

  1. Have you enabled the settings in the game settings page which allows you to sell products?
  2. Replace the line
plr.TempStage.Value += 1

with

plr.TempStage.Value = plr.TempStage.Value + 1
1 Like

Is this a LocalScript? If so, you should move ProcessReceipt to a Script.

1 Like

No it is not in a local script.

1 Like

There is no setting that allows you to sell developer products, only third-party items. Also the change you suggested is completely unnecessary.

1 Like

That’s exactly what I meant, I just forgot the name of it.

1 Like

Is this script interacting with UI?

1 Like

Thanks for helping, but this is works perfectly fine processing the purchase and granting the skip stage in studio. The product will not process in roblox outside of studio. I will try that though.

1 Like

Yes. It is in a mousebutton1click function.

1 Like

Really? Why is there a MouseButton1Click event if it doesn’t interact with any gui as it’s on the server side?

1 Like

You shouldn’t use Scripts to interact with UI, simply using a LocalScript would work just fine in your case, handle the receipt on the server and prompt on the client. I think this may be your issue on why it errors only in game.

1 Like

If you click the textButton, it will prompt a purchase. That is working fine. Everything works fine in studio, but it won’t work in roblox regularly.

1 Like

Afaik ProcessReciept callback should be set on the server

1 Like

Also checking the server-side output using the developer console (F9) to see if anything shows up may help you diagnose the issue.

1 Like

Sooo now nothing works?

char limit

1 Like

Do you have anything outputting either in the studio output window or in the developer console in game?

1 Like

1 Like