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
this script should work fine? i tested it with a local script and it works fine proof
local Player = game.Players.LocalPlayer local ProductID = 642376877 script.Parent.MouseButton1Down:Connect(function(Prompt) game:GetService("MarketplaceService"):PromptProductPurchase(Player, ProductID) end)
Also, ensure that it is a LocalScript and is inside the purchase button.