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
 

Getting all parts from somewhere

Previous Thread :: Next Thread 
Reprezalio is online. Reprezalio
Joined: 11 Feb 2013
Total Posts: 305
01 Mar 2017 08:40 AM
I am pretty new to scripting.

How would you get all parts with the same name from the workspace or anywhere else?
I know you can use :GetChildren, but after what I know that is read only, and you can't actually change the properties of the things you are looking to work with.

So in this case I have a few parts I want to change, I know I could make a table and give them individual names, but it's just wayy to much.
So how do I get all the parts under the same name?

Thanks in advance.

Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
01 Mar 2017 09:08 AM
"I know you can use :GetChildren, but after what I know that is read only, and you can't actually change the properties of the things you are looking to work with."

You understood wrong, that is not the case.
Report Abuse
Reprezalio is online. Reprezalio
Joined: 11 Feb 2013
Total Posts: 305
01 Mar 2017 09:14 AM
So when you use :GetChildren()
how do you specify the name of whatever you want?
I try doing game.Workspace:GetChildren("LOL") put it doesn't work:

gg = game.Workspace:GetChildren("LOL")

gg.Transparency = 1
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
01 Mar 2017 09:16 AM
You iterate over the table it returns and check the name of the child.
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
01 Mar 2017 09:17 AM
local gg = game.Workspace:GetChildren()

print(#gg)
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
01 Mar 2017 09:17 AM
GetChildren doesnt need an argument.
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