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

How do i make gui that people can buy my products from it ? [closed]

Asked by 10 years ago

I need to put in my game VIP product that people could buy it I need help please conact me soon

Closed as Not Constructive by adark and User#2

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 10 years ago

This largely depends on what type of product you are using. A t-shirt? Game pass? Developer Product?

0
t shirt koren919 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Well, there are certain ways you have people buy items, they can touch something, click a GUI or click a brick with a clickdetector.

For example, here is when you click on a brick with a ClickDetector in the brick, it will have them buy the item with the ID

local productId = 19338327--Put the ID for the item here
script.Parent.ClickDetector.MouseClick:connect(function(player)
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) -- should pop up a dialog that prompts the player
end)

OR, if you want it to click a GUI you would do

local productId = 19338327
script.Parent.MouseButton1Click:connect(function(plr)--If the script was in the TextButton or ImageButton
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) -- should pop up a dialog that prompts the player
end)

Here is a ROBLOX wiki from PromptPurchase

http://wiki.roblox.com/index.php?title=PromptPurchase_(Method)

Hope this helped!

0
i cant make it work koren919 0 — 10y