BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 14 Dec 2013 01:41 AM |
function click() id = script.Parent.Parent.Parent.Parent.Item.ID.Value game.Players.PlayerAdded:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player,id) end) end
script.Parent.MouseButton1Down:connect(click)
When i click it does not do anything. |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
Estomac
|
  |
| Joined: 24 Jul 2013 |
| Total Posts: 1180 |
|
|
| 14 Dec 2013 09:08 AM |
http://wiki.roblox.com/index.php/PromptProductPurchase_(Method) http://wiki.roblox.com/index.php/MouseButton1Down_(Event) |
|
|
| Report Abuse |
|
|
Firescrew
|
  |
| Joined: 03 Aug 2012 |
| Total Posts: 1484 |
|
|
| 14 Dec 2013 09:09 AM |
local storething = script.Parent local ITEM_ID = 114305175
local Click = Instance.new("ClickDetector",storething)
Click.MouseClick:connect(function(p) game:GetService("MarketplaceService"):PromptPurchase(p,ID) end) |
|
|
| Report Abuse |
|
|
Firescrew
|
  |
| Joined: 03 Aug 2012 |
| Total Posts: 1484 |
|
|
| 14 Dec 2013 09:09 AM |
| Thats kestrels above so give credit |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 14 Dec 2013 09:13 AM |
So like this?
script.Parent.MouseButton1Down:connect(function(X, Y) local productId = script.Parent.Parent.Parent.Parent.Item.ID game.Players.PlayerAdded:connect(function(player) Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) -- should pop up a dialog that prompts the player end) end) |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 14 Dec 2013 09:14 AM |
@fire
It is GUI not workspace |
|
|
| Report Abuse |
|
|
Estomac
|
  |
| Joined: 24 Jul 2013 |
| Total Posts: 1180 |
|
|
| 14 Dec 2013 09:28 AM |
I reckon this would be easier to understand. I can't test because studio won't launch.
Bond = 007 -- make it simple instead of all those "parents" player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player,itemID) end)
-- Ego sum mercator, ego ancillam habet. |
|
|
| Report Abuse |
|
|
Estomac
|
  |
| Joined: 24 Jul 2013 |
| Total Posts: 1180 |
|
|
| 14 Dec 2013 09:30 AM |
line 1 = itemID
I forgot to change it. That's what I get for changing my mind as often as I do. |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
|
| 14 Dec 2013 09:54 AM |
| The itemId is an IntValue... |
|
|
| Report Abuse |
|
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|
BloxDaily
|
  |
| Joined: 08 Feb 2013 |
| Total Posts: 5319 |
|
| |
|