|
| 07 Mar 2016 07:32 PM |
make it so when someone clicked a GUI, it prompted them to buy?
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:33 PM |
| This might be able to help you: http://wiki.roblox.com/index.php?title=Developer_product |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:33 PM |
Forgot to mention, it's with a gamepass. Not Dev Product.
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:34 PM |
| Here you go, this should be able to help then: http://wiki.roblox.com/index.php?title=Game_pass |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:35 PM |
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService
this helps alot
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:37 PM |
I made a post about this yesterday, but I lost the answer. It was a simple, one-line code?
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:45 PM |
MP = game:service'MarketplaceService'
MP:PromptPurchase ( Player player, int assetId, bool equipIfPurchased = true, CurrencyType currencyType = Default )
taken from the wiki and modified by 2 letters
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:45 PM |
or
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchase
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:49 PM |
Would those prompt the player, if they clicked on the GUI?
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:50 PM |
MP = game:service'MarketplaceService' LP = game:service'Players'.LocalPlayer
[button thing].MouseButton1Click:connect(function() MP:PromptPurchase(LP, assetId) end)
replace [button thing] to your button
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:51 PM |
^ I'll try it.
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 07:57 PM |
This is what it ended up being...
MP = game:service'MarketplaceService' LP = game:service'Players'.LocalPlayer
game.StarterGui.Upgrade.Frame.ImageButton1.MouseButton1Click:connect(function() MP:PromptPurchase(LP, 377553402) end)
...and it still did nothing. There is no error in the Output either.
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:00 PM |
is it in a localscript, it worked for me here:
http://www.roblox.com/games/331251574/no
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:01 PM |
oh and the button is on the side
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:04 PM |
https://gyazo.com/49016e813a10d26900c5ced029a3ff89
^ Here. And yes, it is in a local script.
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:05 PM |
hit f9, goto server log or whatever, if there is anything that relates to the MarketplaceService, say here
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:12 PM |
I don't have an F9. My "F9" turns my screen off.
"But wait, there's more!" -Billy Mays http://www.roblox.com/Source-Stud-Tee-item?id=348585649 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:13 PM |
hit escape, 'help' then 'log'
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:15 PM |
otherwise, i cant help you sorry
4 8 15 16 23 42 |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 08:54 PM |
Ugghhhhh...
Okay, so you would use a .MouseButton1Click on the TextButton or ImageButton; like so.
local player = game:GetService("Players").LocalPlayer local marketplaceservice = game:GetService("MarketplaceService") player.PlayerGui.Upgrade.Frame["ImageButton1"].MouseButton1Click:connect(function() marketplaceservice:PromptPurchase(player, ItemID) end)
The :PromptPurchase has two required parameters, which player you want to prompt to purchase, and the second parameter is the Id of the item you want them to purchase. The not needed parameters are, EquipifPurchased, which will equip the item if they choose to purchase it and it only works on gears; that is a bool and defaults to 'true'. The other un needed parameter is CurrencyType, this is the type of ROBLOX Currency you would like the user to be prompted in. This defaults to, Enum.CurrencyType.Default which you can search up more about here; http://wiki.roblox.com/index.php?title=API:Enum/CurrencyType
Here, are the web pages used to create the script. Search up more about the functions here,
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchase
http://wiki.roblox.com/index.php?title=API:Class/Players/LocalPlayer
|
|
|
| Report Abuse |
|
|