|
| 14 Jun 2013 11:45 PM |
id = 96840892
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player,id) end) |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 14 Jun 2013 11:49 PM |
| Make sure this is in a LocalScript. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 14 Jun 2013 11:58 PM |
| Do you have a ClickDetector? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Jun 2013 11:59 PM |
| If so, then use the MouseClick function. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 15 Jun 2013 12:01 AM |
Is this in a GUI or in a part that contains a ClickDetector? If it's in a part with a ClickDetector, MouseButton1Click doesn't work and it should be in a normal script, so copy and paste this script:
id = 96840892
script.Parent.ClickDetector.MouseClick:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player,id) end)
|
|
|
| Report Abuse |
|
|
| |
|