generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GetChildren()

Previous Thread :: Next Thread 
moshi88 is not online. 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
anthonycotto is not online. anthonycotto
Joined: 24 Jul 2010
Total Posts: 8587
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image