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 » Scripting Helpers
Home Search
 

Re: Quick Question!

Previous Thread :: Next Thread 
maxomega3 is not online. 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
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
11 Oct 2013 07:13 PM
Why not?
getChildren() not GetChildren ()
Report Abuse
maxomega3 is not online. 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
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
11 Oct 2013 07:16 PM
What is g?
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
11 Oct 2013 07:16 PM
I didn't read your whole script.

v=unpack(workspace:children());
Report Abuse
Project2015 is not online. Project2015
Joined: 11 Sep 2013
Total Posts: 384
11 Oct 2013 07:18 PM
getChildren()
GetChildren()

Are the same..
Report Abuse
maxomega3 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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