Problem with Dev Product Purchases

Been trying to look around for someone to help but it still doesnt work, I’m trying to make it that when you purchase a dev product, it gives you a tool but it doesnt seem to work, I’m using park’s donation board in my game so it complicates the script a little for me.

	local MPS = game:GetService("MarketplaceService")
	local tool = game.ServerStorage.Beam -- put weapon here
return function(Info: {[string]: any})
	MPS.ProcessReceipt = function(receiptInfo)
		if receiptInfo.ProductId == 2682816818 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
			tool:Clone()
			tool.Parent = player.Backpack
			print("Worked")
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
	end
end
1 Like