Developer products. 1/13 Developer Products in my game 1 will not work. Coins system purchasing not working

GUYS I NEED HELP!

  1. What do you want to achieve? I have many developer products in my game and THIS SINGLE ONE WILL NOT WORK. I need it to work.

  2. What is the issue? 1/13 Developer products in my game WILL NOT WORK.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? yes. This one developer product WILL NOT WORK!!!

SERVER:

local coins = 1598346890
local mps = game:GetService("MarketplaceService")

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

	if productId == coins then
		print("product bought")
		plr.mainData.Coins.Value += 100
		plr:LoadCharacter()
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

CLIENT:

local assetId = 1598346890
local mps = game:GetService("MarketplaceService")
local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	mps:PromptProductPurchase(plr, assetId)
end)

PLEASE NOTE THAT THE VALUE TO UPDATE IS IN A FOLDER CALLED MAINDATA INSIDE THE PLAYER. COULD THAT BE THE ISSUE?

DEVELOPER FOURM MODERATORS: I AM AWARE I HAVE MADE TOPICS LIKE THIS ONE BUT I REALLY NEED HELP AND NOBODY IS RESPONDING. I CANNOT FIND ANYTHING ON THE DEVFOURM, ON YOUTUBE, OR DOCCUMENTATION. PLEASE HELP ME. THANK YOU.

You supposedly have 13 developer products yet you are only checking for one.

1 Like

Yes. I just tried that because maybe if I used a sepearate script for this system it may work. Please note this is the same code i used. I can show you the code for my skip stage dev product for example, but this is the same. Just with a different asset ID and a different function.

hello? guys please help.

char limit

If you use mps.ProcessReceipt multiple times on different scripts, it will work on Roblox Studio but not In-Game. You must absolutely handle ALL the devproducts in one script, otherwise it’ll work for only one of them.

can I call mps.ProcessReciept multiple times or do I need to do it all in the one call?

You should call it only once. Handle all your product purchases in one script, in one call.

will this work?

YOU ARE A LIFE SAVER THANK YOU SO MUCH! I really appreciate it!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.