I copied this from developer.roblox.com and somehow it is not working. Help?
LocalScript:
local event = game.ReplicatedStorage.Remote:WaitForChild("Purchase")
script.Parent.MouseButton1Click:Connect(function(player)
event:FireServer(player, 1125490296)
end)
Script:
local MarketplaceService = game:GetService("MarketplaceService")
local purchase = game.ReplicatedStorage.Remote:WaitForChild("Purchase")
purchase.OnServerEvent:Connect(function(player, id)
MarketplaceService:PromptProductPurchase(player, id)
end)
Output Error:
12:58:57.784 Argument 2 missing or nil - Server - Purchase:4
12:58:57.785 Stack Begin - Studio
12:58:57.785 Script 'ServerScriptService.Purchase', 4 - Studio - Main:105
12:58:57.785 Stack End - Studio
How?

5 comments
you can just do this from a local script
but won't it only show up on the client and not on the server?
what are you tryna do?
if you want to make a player purchase something then you can use a local script
its a dev product i want to add it on the server because if you add coins on the client its only visual not real