Why Isn't this line being met?

Which donation board are you using? The donation board may be hooking up another ProcessReceipt function.

1 Like

Yeah. The problem is is that only one script can set the callback. What you would need to do is go into the donation ProcessReciept script, and copy and paste everything inside the callback. Then just add it in the script in this topic.

1 Like

I have this error on this line (donation board) quite frankly:

local Products = require(script.Parent.Parent.Products).Products

Error: Products is not a valid member of ModuleScript “Workspace.MainModule”

Remove the .Products inside the require.

1 Like

Can you try removing the .Products in the require?

1 Like

Try doing

local function Processed(receiptInfo)
	print("2")
	local players = game.Players:GetPlayers()
	local done = 0

	for i=1,#players do
		if players[i].userId == receiptInfo.PlayerId then
			if receiptInfo.ProductId == 1086221671 and done == 0 then
				done = 1
				players[i].leaderstats.Stage.Value = players[i].leaderstats.Stage.Value + 1
				players[i]:LoadCharacter()
				done = 0
			end
		end
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

MarketplaceService.ProccessReceipt:Connect(Processed)

When I delete the .Products the last two errors occur; I do also have a gravity coil gamepass which could also be interfering.

Nope, it is a callback, not an event.

1 Like

Assuming we’re using the same donation board, do you know which script it was?

It was back in February so I have no idea which line it was and I was also making an obby. So sorry I don’t.