Developer Products won't work

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my Developer Products to work when I or somebody else buy them.
  2. What is the issue? Include screenshots / videos if possible!
    Nothing will happen after purchasing it.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I added a print to the script and when I bought the developer product it didn’t print.
    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 MarketplaceService = game:GetService("MarketplaceService")
local SS = game:GetService("SoundService")
local Products = {
-- NOTE I HAVE THE PRODUCT ID INSERTED IN THE BRACKETS, JUST DIDN'T PUT IN SCRIPT.
    [0]=function(receipt,player)--give currency
		player.leaderstats.Points.Value = player.leaderstats.Points.Value +math.floor(player.leaderstats.Points.Value*.2+100)
    end;
            }


function MarketplaceService.ProcessReceipt(receiptinfo)
	local playerProductKey = receiptinfo.PlayerId..":"..receiptinfo.PurchaseId
	local plr = game:GetService("Players"):GetPlayerByUserId(receiptinfo.PlayerId)
	
	local handler
	for ProductId,func in pairs(Products) do
		if ProductId == receiptinfo.ProductId then
			handler = func break
		end
	end
	
local suc = pcall(handler,receiptinfo,plr)
return Enum.ProductPurchaseDecision.PurchaseGranted
end

Can you guys help me? By the way no errors when I buy it.

I asked Bing AI, and it actually seems like it might be right!

Based on your post, it seems like you have two scripts that handle the product purchase event. According to some web sources(1), you must have only one script that receives this event for Roblox to work properly. You may want to try merging your scripts into one and see if that solves the issue.

thank you! it helped and now the developer product works!

1 Like

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