script.Parent.ClickDetector.MouseClick:Connect(function()
game:GetService("MarketplaceService"):PromptPurchase(438478073)
end)
✓ ANSWER ACCEPTED
Why is it saying Argument 2 missing or nil?
1 answer
✓ Accepted answer
The PromptPurchace function requires a Client argument to fire it to also two more. I suggest PromptGamePassPurchase. If you'd like to run to all Clients, write your code in a for loop with the example below, but this should fix your code
script.Parent.ClickDetector.MouseClick:Connect(function(Player) --// ClickDetectors have an argument that passes the Player who clicked
game:GetService("MarketplaceService"):PromptGamePassPurchase(Player, 438478073, )
end)
For All Clients
script.Parent.ClickDetector.MouseClick:Connect(function()
for _,Player in ipairs(game.Players:GetPlayers()) do
game:GetService("MarketplaceService"):PromptGamePassPurchase(Player, 438478073)
end
end)
PromptPurchase requires the Client to fire to, the asset Id, equip on purchase, and currency type
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
why? he didn't say he wanted to prompt a game pass purchase
I know, that's why I put the list of arguments required by PromptPurchase, in case he wasn't looking to sell