maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2013 07:12 PM |
Is it possible to use GetChildren twice?
Ex: local v = Workspace:GetChildren () local g = v:GetChildren ()
Say you have a Workspace full of bricks that all have meshes, and you want to refer to all of them.
|
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:13 PM |
Why not? getChildren() not GetChildren () |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2013 07:15 PM |
Doesn't matter. The first line worked, but it doesn't like the second. Error line:
Workspace.Script:2: attempt to call method 'GetChildren' (a nil value) |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Oct 2013 07:16 PM |
I didn't read your whole script.
v=unpack(workspace:children()); |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 07:18 PM |
getChildren() GetChildren()
Are the same.. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2013 07:24 PM |
| What? I've never seen "unpack" before. Do you include the ";"? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 11 Oct 2013 07:28 PM |
unpack just unpacks a table into parameters
x, y = unpack({1, 2}) x is 1 y is 2 |
|
|
| Report Abuse |
|
|