Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Dev. Product isnt working? [ANSWERED]

I am working on a script for my other account's cafe and I need some help. This is what I have so far:

local Market = game:GetService("MarketPlaceService")
local id = 19932057 -- This is a developer product ID.


function hi()
Market:PromptProductPurchase(game.Players.LocalPlayer, id)
end
script.Parent.Button.MouseButton1Down:connect(hi)

Its not even giving me a prompt? What do I do?

2 answers

This should work. Make sure it's a LocalScript

local MarketplaceService = Game:GetService("MarketplaceService")
local productId = 19932057
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)

6 comments

0

This didnt work.

0

Its a Dev. Product, so it isnt an actual "item". The actual id leads to a place.

0

Dev Products aren't shown on the website. Only In-Game. Make sure you're testing in play mode.

0

I am, its not working... go to JOJObuddy011, join his active place and try the buy cash button. It dosent work.

0

Did you put the script inside of the TextButton? Made sure it's a LocalScript?

0

This actually worked, I didnt review the script as I didnt have the script in the button in the first place! Thanks!

--[[ WHAT YOU NEED:
In the workspace, make a brick called BuyButton
In the brick insert a SurfaceGui and name it SurfaceGui
In the Gui, insert a TextButton and name it TextButton
INSERT THIS SCRIPT INTO A LOCALSCRIPT IN THE STARTERPACK
]]
while true do
local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton
buyButton.MouseButton1Click:connect(function()
    local productId = 19932057
    Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
end)
end

--Hope this helped!
-- Made By Vividex

Didn't test it, quickly wrote it.

3 comments

0

This script made it so I couldnt join the game e.e

0

.-. Sorry I said I didn't test it :P

0

Its okay

This discussion is preserved as it was. New answers, comments, and votes are closed.