KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Nov 2013 06:26 PM |
Just wanna quickly review the topic.
tell me if im right for both
all = game.Workspace.Brick:GetChildren() all.Transparency = 1
Do you have to make a loop?
all = game.Workspace.Brick:GetChildren() for i = 1, #all do all[i].Transparency = 1 end
could I do this?
while true do all = game.Workspace.Brick:GetChildren() for i = 1, #all do all[i].Transparency = 1 end end
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 23 Nov 2013 06:40 PM |
You don't need a while-loop, but you do need the in pairs (or in next) iterator.
If you want to make all parts under Workspace.Brick transparent:
for i, v in next, Workspace.Brick:GetChildren() do if v:IsA("BasePart") then -- Important to prevent common errors v.Transparency = 0 end -- endif end -- endfor |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2013 06:42 PM |
| @XAX His numeric for loop should work fine. If he prefers that to iterators then let it be. Using an iterator with a for loop is not needed. |
|
|
| Report Abuse |
|
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 23 Nov 2013 06:55 PM |
| I suppose. My main concern was the while loop in the beginning. It was unnecessary, and would crash the client since there's no wait() anywhere in it. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Nov 2013 09:33 PM |
| Wut if I want it to run an infinite amount? |
|
|
| Report Abuse |
|
|
XAXA
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 6315 |
|
|
| 23 Nov 2013 09:51 PM |
After you change the transparency of the parts to 1, it will remain invisible indefinitely.
Do you want it to blink? |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Nov 2013 09:53 PM |
I just want to know if u can make it run infinetely. I could easily make this blink..... But I was wondering how to make it infinite |
|
|
| Report Abuse |
|
|