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 |
|
|
|
| 25 Apr 2014 11:37 AM |
bricks = game.Workspace:GetChildren()
if bricks.Name == "brick" then bricks.Transparency = 0
end |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|