I’ve been trying to make this Skip Stage gamepass for my game work, but each time I test the purchase it sends the same Server response
[Server] Wrong ProductId, ignoring.
I’ve double-triple-checked that the ProductIDs match in studio and under my DevProducts. I wrote a separate script to print them all out to ensure I wasn’t losing my mind. These IDs match and are the same as the ones on my end.
LocalScript (under the ImageButton, nested under a TextLabel and a ScreenGUI)
local button = script.Parent
local player = game.Players.LocalPlayer
local MarketplaceService = game:GetService("MarketplaceService")
local devProductId = 3396791435
button.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(player, devProductId)
end)
ServerScript (in ServerScriptService)
local MarketplaceService = game:GetService("MarketplaceService")
local devProductId = 3396791435
for _, product in pairs(game:GetService("MarketplaceService"):GetDeveloperProductsAsync():GetCurrentPage()) do
print("Product:", product.Name, "ID:", product.ProductId)
end
local function processReceipt(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receiptInfo.ProductId == devProductId then
local leaderstats = player:FindFirstChild("leaderstats")
local stage = leaderstats and leaderstats:FindFirstChild("Stage")
if stage then
stage.Value += 1
print(player.Name .. " bought Skip Stage. New Stage: " .. stage.Value)
else
warn("No leaderstats or Stage found for " .. player.Name)
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt:Connect(processReceipt)
Here is an image of my DevProduct:
Help! Me and my team agreed to push this game in an hour, and this was supposed to be a twenty minute fix, but I’ve not the faintest clue what’s going on.
