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: GetChildren?

Previous Thread :: Next Thread 
zappy00 is not online. zappy00
Joined: 02 May 2009
Total Posts: 7091
12 Jul 2012 01:21 PM
Let's say there's a cube that is made out of other tiny cubes.
The little cubes are anchored, but need to be unanchored when a button is clicked.

How do I use the getchildren method or function in this case so they all become unanchored all together? I don't want to assign a variable to every single little cube.
Report Abuse
jaydan1 is not online. jaydan1
Joined: 13 Jan 2010
Total Posts: 128
12 Jul 2012 01:24 PM
for i,v in pairs(game.Workspace.Cubes:GetChildren()) do
v.Ancored = false
end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
12 Jul 2012 01:28 PM
@jayden

1. Spelled Anchored wrong.

2. What if the value is not a part and doesn't have a property Anchored hmm?


for i,v in pairs(game.Workspace.Cubes:GetChildren()) do
if v:IsA("Part") then
v.Anchored = true
end
end
Report Abuse
zappy00 is not online. zappy00
Joined: 02 May 2009
Total Posts: 7091
12 Jul 2012 01:47 PM
Thank you so much. ^_^ Both
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
12 Jul 2012 01:50 PM
l_l

Yep :D
Report Abuse
UberGiantBuilder is not online. UberGiantBuilder
Joined: 08 Jul 2012
Total Posts: 1233
12 Jul 2012 01:55 PM
Miz I have to correct you, you put anchored is true not false dumdum
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
12 Jul 2012 02:02 PM
So? He could change the booleans if he wanted.
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