025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 22 Aug 2015 12:38 PM |
local product = 25786121
script.Parent.ClickDetector.MouseClick:connect(function(x) game:GetService("MarketplaceService"):PromptProductPurchase(game.Players:GetPlayerFromCharacter(x),product) end)
REGULAR script in a brick in workspace |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 22 Aug 2015 12:41 PM |
local product = 25786121
script.Parent.ClickDetector.MouseClick:connect(function(x) game:GetService("MarketplaceService"):PromptProductPurchase(x,product) end)
The MouseClick event for click detectors passes a Player reference, not the Player's character. |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
| |
|