Developer products interfering?

So I got one of those “donation boards” in my game and its currently interfering with another developer product script, making it so the developer product script doesn’t work, is there any help with this?

More information is required, post the scripts involved. It could be that you call the receipt multiple times?

“Merge” your two scripts. Callback functions only accept things from a single return.

2 Likes
local MarketService = game:GetService("MarketplaceService")

local function BuyPruduct(receiptInfo)
	print("function receve")
    local plr = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
	if receiptInfo.ProductId == 1175594133 then
		local Bool = Instance.new("BoolValue")
		print("made bool")
		Bool.Name = "BoughtRequest"
		Bool.Parent = plr
	end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end


MarketService.ProcessReceipt = BuyPruduct
print("function sent")

heres the script i think is responsible. so basically with the donation board, it collects all of the boughten donations in and it displays their names in an order, and the top one gets a little character, but this script, I feel like when its calling all those recepits its not actually checking the id of the receipt, because this is going off before anybody buys it?

Do you use the receipt in any other script? Also do this:

MarketService.ProcessReceipt = function(receiptInfo)
	print("function receve")
    local plr = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
	if receiptInfo.ProductId == 1175594133 then
		local Bool = Instance.new("BoolValue")
		print("made bool")
		Bool.Name = "BoughtRequest"
		Bool.Parent = plr
	end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end

im gonna give a brief but complicated rundown, so a player buys the product, and so the script u see above is suppsoed to alert the script above. From there, this localscript goes off

Player.ChildAdded:Connect(function(child)
	if child.Name == "BoughtRequest" then
		if Cool == false then
			Cool = true
			game.ReplicatedStorage:WaitForChild("RequestThing"):FireServer(SongID.Text)
			print("fired server")
			Test.SoundId = "rbxassetid://"  .. 0
			Test.Loaded:Wait()
			script.Parent.Visible = false
			script.Parent.Parent.SongId.Text = "Sorry you are in cooldown."
			script.Parent.Parent.SongId.TextEditable = false
			wait(420)
			Cool = false
			script.Parent.Visible = true
			script.Parent.Parent.SongId.TextEditable = true
			script.Parent.Parent.SongId.Text = ""
		end
	end
end)

and then ends up here (only part of the script)

game.ReplicatedStorage:WaitForChild("RequestThing").OnServerEvent:Connect(b)

print("got request")

print(b)

oddly enough, for some reason, this above gets set off when the donation board loads in, I have 0 clue as to why or how

So I’m assuming you’ve connected that to a PromptPurchase. If so then does anything print when you try to complete a purchase?

You also said that you had multiple developer product scripts?

Nothing prints when i end up actually purchasing. And no I have no other developer product scripts, just our donation board and this request

Could you post all the scripts related to this issue?