Hello, I'm trying to make an in-game developer product purchase when you press a button but it doesn't work and I don't know why because it doesn't output any errors.
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ProductID = 642376877
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(Player, ProductID)
end)
Help Would Be Really Appreciated

4 comments
I tested this code and it is working .. are you using ServerScript or LocalScript?
LocalScript
It should work
I just solved it.