moshi88
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 61 |
|
|
| 13 Jan 2016 05:16 AM |
How does one get all children except one?
for instance:
for _, WorkItems in ipairs(workspace.GetChildren("Terrain")) WorkItems:remove() end
Is how I thought you did it, but its not. How would you? |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 05:42 AM |
| GetChildren needs a directory, i.e variable assigned and it's value. I think, that's how they did in tutorials. |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 13 Jan 2016 06:03 AM |
you don't just throw an if statement checking for the instance's name or something similar
also you are using the function wrong you have to either do
workspace.GetChildren(workspace) or simply workspace:GetChildren()
GetChildren doesn't use any arguments but the self one which is automatically passed when you call the function as a method |
|
|
| Report Abuse |
|
|
moshi88
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 61 |
|
|
| 13 Jan 2016 06:14 AM |
Thanks, I decided to use :IsA() To check, to grab all that I want besides Terrain
|
|
|
| Report Abuse |
|
|