Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
|
| 18 May 2014 05:36 AM |
In a localscript (which runs perfectly in Solo, of COURSE) I've got a looping check to make sure two children are present within the tool. Before this check, I have: print('ducks1') -- Just to see how far the script has gotten.
Then this:
local stats = tool:findFirstChild("Stats") local guimain = tool:findFirstChild("WeaponGui") repeat wait() until stats~=nil and guimain~=nil
Then afterwards:
print('ducks2')
The output only shows ducks1, which means we didn't pass the check. These items are both in the tool when I look, but somehow, the script is literally ignoring their existance. Any help? |
|
|
| Report Abuse |
|
|
Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
| |
|
|
| 18 May 2014 05:52 AM |
That is like saying var_1 = false var_2 = true repeat wait() until var_1 and var_2
You aren't checking again.
Try something like this:
repeat wait() until parent:findFirstChild(child_1) and parent:findFirstChild(child_2) |
|
|
| Report Abuse |
|
|
Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
|
| 18 May 2014 05:55 AM |
That....makes sense. Thanks! |
|
|
| Report Abuse |
|
|