|
| 07 Aug 2014 11:23 AM |
local element = script.Parent local id = 161562960 player=script.Parent.Parent.Parent.Parent --how many parents are needed
element.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(player,id) wait(1) if purchased then i = game.Lighting.RAIN:Clone() i.Parent = game.Workspace end end)
|
|
|
| Report Abuse |
|
|
|
| 07 Aug 2014 11:25 AM |
Is there any output? Is that the entire script? How is this "purchased" variable being set?
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
NetsFan0
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 2777 |
|
|
| 07 Aug 2014 11:25 AM |
local element = script.Parent local id = 161562960 player=script.Parent.Parent.Parent.Parent --how many parents are needed
script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player,id) wait(1) if purchased then i = game.Lighting.RAIN:Clone() i.Parent = game.Workspace end end) |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 07 Aug 2014 11:25 AM |
| if its in a screen gui, just remove 1 parent from the end |
|
|
| Report Abuse |
|
|
NetsFan0
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 2777 |
|
|
| 07 Aug 2014 11:26 AM |
| If you are selling anything other then a dev product use PromtPurchase rather than PromptProductPurchase. |
|
|
| Report Abuse |
|
|
NetsFan0
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 2777 |
|
|
| 07 Aug 2014 11:26 AM |
| And I can tell from the ID this is an Admin Game Pass. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2014 11:27 AM |
@NetsFan0 You changed nothing with your script, other than replacing script.Parent with the variable for script.Parent...
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
NetsFan0
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 2777 |
|
|
| 07 Aug 2014 11:29 AM |
| I changed PromptProductPurchase to PromptPurchase because he is selling a gamepass not a dev product. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 07 Aug 2014 11:36 AM |
local element = script.Parent local id = 161562960 player=script.Parent.Parent.Parent.Parent --how many parents are needed --probably something g\wrong with that ^ element.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(player,id) wait(1) --if purchased then-- purchased is nil, so never i = game.Lighting.RAIN:Clone() i.Parent = game.Workspace --end end) |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2014 11:37 AM |
@NetsFan0 Oops sorry, I never noticed that. Many apologies.
Anyways, am I the only one who cares that the "purchased" variable is popping up out of nowhere?
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2014 11:37 AM |
@Myself Got ninja'd, Kevin did.
Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson |
|
|
| Report Abuse |
|
|
NetsFan0
|
  |
| Joined: 17 Apr 2009 |
| Total Posts: 2777 |
|
|
| 07 Aug 2014 11:39 AM |
| Oh yeah, just saw the random "if purchased" |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2014 11:48 AM |
local element = script.Parent local id = 161562960 local player = game.Players.LocalPlayer
element.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptPurchase(player, id, isPurchased) wait(1) if isPurchased then local i = game.Lighting.RAIN:Clone().Parent == game.Workspace end end) --localscript in startergui |
|
|
| Report Abuse |
|
|