Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

One part, where when you click on it, it asks you to buy a t-shirt ?

Hi people, I'm here to ask, how to make that when we click on a share, it asks us to buy a t-shirt, for one of my game roblox ? I ask it here seen that on youtube and internet, there is not asser of tuto to make what I want to do on roblox studio, if someone of you answer me a question, I would have all your respect! Ciao !

roblidi01

3 comments

0

Sorry to be a bummer, but this isn't a request site! There's some really simple tutorials and the Roblox API website too.

1 answer

This can be done using a script and running MarketplaceService:PromptPurchase()

local mps = game:GetService('MarketplaceService') -- using to prompt a purchase
local id = 7403020516 -- change this to your t shirt id (make sure it's public)
local cd = script.Parent.ClickDetector -- change this to the location of your clickdetector (in part)

cd.MouseClick:Connect(function(p) -- player clicks
	mps:PromptPurchase(p, id)
end)

Sources: https://developer.roblox.com/en-us/api-reference/event/ClickDetector/MouseClick https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/PromptPurchase

2 comments

0

This is perfect! Upvoted :D

0

Good enough.

This discussion is preserved as it was. New answers, comments, and votes are closed.