I need to put in my game VIP product that people could buy it I need help please conact me soon
COMMUNITY QUESTION
How do i make gui that people can buy my products from it ?
2 answers
This largely depends on what type of product you are using. A t-shirt? Game pass? Developer Product?
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!
1 comment
0
i cant make it work
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
t shirt