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: Select Multiple Items

Previous Thread :: Next Thread 
bar009 is not online. bar009
Joined: 07 Apr 2010
Total Posts: 40
25 Apr 2014 11:26 AM
Hello, is there a possibility that you can do this:

script.Parent.(Somehow select all parts named brick).Transparency = 0

?

That would be awesomely great if you actually could do that, would be very thankful for a reply :D
Report Abuse
iOffensive is not online. iOffensive
Joined: 13 Jun 2013
Total Posts: 416
25 Apr 2014 11:37 AM
bricks = game.Workspace:GetChildren()

if bricks.Name == "brick" then
bricks.Transparency = 0

end
Report Abuse
bar009 is not online. bar009
Joined: 07 Apr 2010
Total Posts: 40
25 Apr 2014 11:58 AM
Love you sir, you really helped me out :3
Report Abuse
Apocalyps is not online. Apocalyps
Joined: 15 Feb 2009
Total Posts: 816
25 Apr 2014 12:47 PM
that won't work...

try this instead:

for i, part in pairs(script.Parent:GetChildren()) do
if part.Name == "Brick" then
part.Transparency = 0
end
end
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
25 Apr 2014 01:08 PM
or

while true do
wait()
part = game.Workspace:findFirstChild("Brick")
part.Transparency = 0
wait()
end
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
25 Apr 2014 01:10 PM
Gross, a while loop in this situation is terrible.
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
25 Apr 2014 01:10 PM
Ignore my last post. I realize this doesn't work and I messed up. :P
Report Abuse
bar009 is not online. bar009
Joined: 07 Apr 2010
Total Posts: 40
25 Apr 2014 06:13 PM
Yeah I just tested it and the first one didn't work and I looked it up on the Wiki (It looks confusing :S), thanks!
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Apr 2014 06:15 PM
c = game.Workspace.Thingie:GetChildren()

for i = 1,#c do
c[i].Transparency = 1
end
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Apr 2014 06:16 PM
c = script.Parent:GetChildren()

for i = 1,#c do
if c[i].Name == "Brick" then
c[i].Transparency = 1
end
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
25 Apr 2014 06:22 PM
2 Methods::

The Generic For Loop:

for i,v in pairs(workspace:GetChildren()) do
if v.Name == "Brick" then
v.Transparency = 1
end
end

For Loop:

bricks = workspace:GetChildren())

for i = 1,#bricks do
bricks[i].Transparency = 1
end

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