Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What does this PromptProductPurchase error mean?

PurchasePromptScript: getProductInfo failed because MarketplaceService:getProductInfo() failed because rawProductInfo was empty Make sure a valid ID was specified <

LocalScript:

local MPS = game:GetService("MarketplaceService")
local RPS = game:GetService("ReplicatedStorage")

script.Parent.MouseButton1Click:connect(function()
	MPS:PromptProductPurchase(game.Players.LocalPlayer, 643910613)
end)

RPS.Events.BuyPrompt.OnClientEvent:connect(function(player, product)
	if product == "Upgrade" then
		script.Parent.Text = "You Own This Item"
	end
end)

Main Script:

local MPS = game:GetService("MarketplaceService")
local RPS = game:GetService("ReplicatedStorage")
local product = ""

MPS.ProcessReceipt = function(purchaseInfo)
	local player = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
	if purchaseInfo.ProductId == 643910613 then
		product = "Upgrade"
		RPS.Events.BuyPrompt:FireClient(product)
	elseif purchaseInfo.ProductId == 653173240 then
		product = "Elite"
		RPS.Events.BuyPrompt:FireClient(product)
	elseif purchaseInfo.ProductId == 659939994 then
		product = "Palace"
		RPS.Events.BuyPrompt:FireClient(product)
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

6 comments

0

Well, was a valid ID specified?

0

What does that mean?

0

The ids in the script are valid yes, if that is what you mean

0

Double check that those are valid IDs. They could have typos.

0

100% valid checked them 10 times

0

Double the times you've checked them.

1 answer

The error means that it cannot do PromptProductPurchase because the ID is wrong or it cannot find the ID. Double check the IDs in your scripts.

This discussion is preserved as it was. New answers, comments, and votes are closed.