Help with dev prod script

It was working fine before and now it stopped working, im not sure why

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local productFunctions = {}

productFunctions[1656732042] = function(receipt, player)
	if player ~= nil then
		player.swords:WaitForChild("Crimson").Value = player.swords:WaitForChild("Crimson").Value + 1
	end
end

local function processReceipt(receiptInfo)
	local userId = receiptInfo.PlayerId
	local productId = receiptInfo.ProductId
	local player = Players:GetPlayerByUserId(userId)
	if player then
		local handler = productFunctions[productId]
		local success, result = pcall(handler, receiptInfo, player)
		if success then
			game.ReplicatedStorage.CrimsonPurchaseT:FireClient(player)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		else
			warn("Failed to process receipt:", receiptInfo, result)
		end
	end
	return Enum.ProductPurchaseDecision.NotProcessedYet
end
MarketplaceService.ProcessReceipt = processReceipt
1 Like

Does it show that the process failed? Or is it an unprecedented error?

no errors

charcharcharcharchar

Maybe check the client side script for this remote? If there’s no errors with the product handler it could be something wrong there.