In my game a player needs to click a certain part to be prompted to buy the developer product, however I don't know how this is done. Also I'm not very familiar with scripting at all so an example would be appreciated. Thanks for helping :D
✓ ANSWER ACCEPTED
How do I prompt a developer product purchase when a player clicks a part?
1 answer
✓ Accepted answer
Here you go.
Put this as a script inside your part.
local MarketplaceService = game:GetService("MarketplaceService")
local Part = script.Parent
local ClickDetector = Part:WaitForChild("ClickDetector")
local ProductId = 9999 -- Change this to your product id
ClickDetector.MouseClick:Connect(function(Player)
MarketplaceService:PromptProductPurchase(Player, ProductId)
end)
4 comments
0
Thank you so much for this :D
0
It isn't working :/
0
Try it again
0
TYSM
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptProductPurchase
I don't understand scripting very well, I would love an example ;-;