|
| 02 Sep 2013 06:46 PM |
For some reason, this isn't doing what I want. It's functioning, but weirdly. It's supposed to make about a hundred bricks in a model turn invisible over about a second, but instead of doing that, it cycles through each individual brick and makes it become transparent and then opaque, and moves on to the next one. How can I make all one hundred bricks change properties at exactly the same time?
Here's the script. It was working fine and making all the parts transparent at what I THINK was exactly the same time, until I added the 5th line all the way up to the line right before end.
while wait() do for i,v in pairs (script.Parent:GetChildren()) do if v:IsA("BasePart") then v.Transparency = 0.1 wait(0.01) v.Transparency = 0.2 wait(0.01) v.Transparency = 0.3 wait(0.01) v.Transparency = 0.4 wait(0.01) v.Transparency = 0.5 wait(0.01) v.Transparency = 0.6 wait(0.01) v.Transparency = 0.7 wait(0.01) v.Transparency = 0.8 wait(0.01) v.Transparency = 0.9 wait(0.01) v.Transparency = 1 wait(0.01) v.Transparency = 0.9 wait(0.01) v.Transparency = 0.8 wait(0.01) v.Transparency = 0.7 wait(0.01) v.Transparency = 0.6 wait(0.01) v.Transparency = 0.5 wait(0.01) v.Transparency = 0.4 wait(0.01) v.Transparency = 0.3 wait(0.01) v.Transparency = 0.2 wait(0.01) v.Transparency = 0.1 wait(0.01) end end end |
|
|
| Report Abuse |
|
|
| 02 Sep 2013 06:52 PM |
while wait() do for I = 1, 10 do for I, v in ipairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then wait(0.01) v.Transparency = v.Transparency + 0.1 end end end for I = 1, 10 do for I, v in ipairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then wait(0.01) v.Transparency = v.Transparency - 0.1 end end end |
|
|
| Report Abuse |
|