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

How can I sell Developer Product in-game with Store Creator?

Asked by 10 years ago

I have already attempted to sell them in-game with the Store Creator system, but it gives me the ID's of other items, such as shirts and models. I know where to get the ID of the Products, but I can't figure out how to get the correct item to sell it.

If this makes it any different, I would like to make a button for this, instead of the drop down GUI.

Sorry, I am new to Scripting, so I do apologize if this can be considered too broad.

1 answer

Log in to vote
0
Answered by 10 years ago

This should work.. or not I didn't test it...

Put this code in a LocalScript and the LocalScript in-side the GUI button:

local player = game.Players.LocalPlayer -- the player
local ID = 0 -- the product ID

script.Parent.MouseButton1Click:connect(function()
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, ID)
end)
Ad

Answer this question