I have the right asset id for my devproduct but for some reason it’s giving me the error: Argument 2 missing or nil, all my other ones in the same script work except the last one.
Script:
local marketplaceService = game:GetService("MarketplaceService")
local localPlayer = game.Players.LocalPlayer
local function promptDonoPurchase(amount)
local devProducts = {
["5"] = 1746850210,
["10"] = 1746850863,
["25"] = 1746851262,
["50"] = 1746851797,
["100"] = 1746852037,
["500"] = 1746852293,
["1000"] = 1746852532,
["10000"] = 1746852743
}
marketplaceService:PromptProductPurchase(localPlayer, devProducts[amount])
end
for _,btn in pairs(script.Parent:GetChildren()) do
if btn:IsA("TextButton") then
btn.MouseButton1Down:Connect(function()
promptDonoPurchase(btn.Name)
end)
end
end