Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Dev. Product isnt working? [ANSWERED]

Asked by 10 years ago

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

Log in to vote
1
Answered by
TofuBytes 500 Moderation Voter
10 years ago

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)
0
This didnt work. User#4679 0 — 10y
0
Its a Dev. Product, so it isnt an actual "item". The actual id leads to a place. User#4679 0 — 10y
0
Dev Products aren't shown on the website. Only In-Game. Make sure you're testing in play mode. TofuBytes 500 — 10y
0
I am, its not working... go to JOJObuddy011, join his active place and try the buy cash button. It dosent work. User#4679 0 — 10y
View all comments (2 more)
0
Did you put the script inside of the TextButton? Made sure it's a LocalScript? TofuBytes 500 — 10y
0
This actually worked, I didnt review the script as I didnt have the script in the button in the first place! Thanks! User#4679 0 — 10y
Ad
Log in to vote
-1
Answered by
Vividex 162
10 years ago
--[[ 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.

0
This script made it so I couldnt join the game e.e User#4679 0 — 10y
0
.-. Sorry I said I didn't test it :P Vividex 162 — 10y
0
Its okay User#4679 0 — 10y

Answer this question