Hello, I am still learning scripting and havent worked with developer product set-up or anything like that. I used the documentation kind of as a template to work off of and added my id and thing I would like to happen within it
Local Script (Within a textbutton in a screenggui)
local MarketplaceService = game:GetService("MarketplaceService")
local prodID = 3324799602 -- Make this number your Product ID
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, prodID)
end)
ServerScript (ServerScriptService)
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local productFunctions = {}
-- Example: product ID 123123 brings the user back to full health
productFunctions[3324799602] = function(receipt, player)
local character = player.Character
local humanoid = character and character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
print("Adding part")
local RainPart = Instance.new("Part")
RainPart.Name = "RainPart"
RainPart.Size = Vector3.new(3,1,3)
RainPart.Anchored = true
RainPart.Transparency = .4
RainPart.Parent = workspace
if workspace:FindFirstChild("RainPart") then
print("Found RainPart")
end
return true
end
end
local function processReceipt(receiptInfo)
local userId = receiptInfo.PlayerId
local productId = receiptInfo.ProductId
local player = Players:GetPlayerByUserId(userId)
if player then
-- Gets the handler function associated with the developer product ID and attempts to run it
local handler = productFunctions[productId]
local success, result = pcall(handler, receiptInfo, player)
if success then
-- The user has received their items
-- Returns "PurchaseGranted" to confirm the transaction
return Enum.ProductPurchaseDecision.PurchaseGranted
else
warn("Failed to process receipt:", receiptInfo, result)
end
end
-- The user's items couldn't be awarded
-- Returns "NotProcessedYet" and tries again next time the user joins the experience
return Enum.ProductPurchaseDecision.NotProcessedYet
end
-- Sets the callback
-- This can only be done once by one server-side script
MarketplaceService.ProcessReceipt = processReceipt
I understand you cannot test developer products in studio so i published it to a private game and played, im spending real robux on it, but nothing is happening, none of my prints are firing either, I dont understand whats going on. Would really appreciate some help understanding why this isn’t doing anything.

