mulJR
|
  |
| Joined: 25 Dec 2012 |
| Total Posts: 305 |
|
|
| 29 Jan 2015 11:58 AM |
| Where if you click a brick it gives you a screen asking you if you want to purchase that game pass that featured on it.Bad explanation and probably wrong forum.. |
|
|
| Report Abuse |
|
|
Crythox
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1188 |
|
|
| 29 Jan 2015 11:59 AM |
| MarketplaceService:PromptProductPurchase |
|
|
| Report Abuse |
|
|
mulJR
|
  |
| Joined: 25 Dec 2012 |
| Total Posts: 305 |
|
|
| 29 Jan 2015 12:03 PM |
| It's for currency how do i change it so i can do it for game passes? |
|
|
| Report Abuse |
|
|
Crythox
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1188 |
|
|
| 29 Jan 2015 12:09 PM |
MarketplaceService:PromptPurchase(id of gamepass,player)
|
|
|
| Report Abuse |
|
|
mulJR
|
  |
| Joined: 25 Dec 2012 |
| Total Posts: 305 |
|
|
| 29 Jan 2015 12:21 PM |
would this work,
local gamepassId = [Gamepass ID]
--Prompts the player to purchase the GearItem script.Parent.ClickDetector.MouseClick:connect(function(player) Game:GetService("MarketplaceService"):PromptPurchase(player, gamepassId) end) Itson a surface gui textbox
or this?
local id = 0 local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() if script.Parent.Text == "BUY" then game:GetService("MarketplaceService"):PromptPurchase(player,id) end end)
|
|
|
| Report Abuse |
|
|
Crythox
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1188 |
|
|
| 29 Jan 2015 12:32 PM |
| Change 'id' to the variable that holds the id of the gamepass, or change it to the id of the gamepass directly. with no variable. |
|
|
| Report Abuse |
|
|