Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 21 May 2015 07:02 PM |
No errors in output, no errors in developer console..
local cup = script.Parent.Parent.Cup local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices for _,one in pairs(gui:GetChildren()) do if one:IsA("TextButton") then gui.MouseButton1Down:connect(function() cup.Enabled = true cup:Clone() cup.Parent = storage cup.Name = one.Name end) end |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 21 May 2015 07:18 PM |
sorry, forgot to put in post.. but it is in the script
local storage = script.Parent.Parent.Storage |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 21 May 2015 07:21 PM |
I don't want to use :WaitForChild since their is multiple 'TextButtons'...
this should be working fine but it doesn't.. |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 21 May 2015 08:32 PM |
use WaitForChild
It fixes almost all problems with loading |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 21 May 2015 08:47 PM |
| but their is multiple childs |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
|
| 21 May 2015 11:45 PM |
use waitforchild
u should add filtering - devious |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 21 May 2015 11:53 PM |
| WaitForChild didn't fix it, still not doing anything... |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 22 May 2015 12:02 AM |
Try this
local cup = script.Parent.Parent.Cup local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices local storage = script.Parent.Parent.Storage
function onClick() for i, v in pairs(gui:GetChildren()) do if v:IsA("TextButton") then cup.Enabled = true cup:Clone() cup.Parent = storage cup.Name = v.Name end end end gui.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 22 May 2015 12:03 AM |
local cup = script.Parent.Parent.Cup local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices for _,one in pairs(gui:GetChildren()) do if one:IsA("TextButton") then one.MouseButton1Down:connect(function() -- lol noob u have to use one not gui cup.Enabled = true cup:Clone() cup.Parent = storage cup.Name = one.Name end) end |
|
|
| Report Abuse |
|
|