|
| 23 Jun 2014 09:19 PM |
for i = 1,0,.1 do local b = game.Workspace.Model:GetChildren("Part") b.Transparency = i wait() end
no output. assume all items are as shown. |
|
|
| Report Abuse |
|
|
Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
|
| 23 Jun 2014 09:21 PM |
You're trying to get to a lower number by a positive increment
for i = 1, 0, -.1 do --blah-- wait() end |
|
|
| Report Abuse |
|
|
| |
|
Geomaster
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 1480 |
|
|
| 23 Jun 2014 09:25 PM |
Uh, there's also the deal that :GetChildren doesn't return an instance, it returns a table You could do this, however
local parts = workspace.Model:GetChildren()
for i = 1, 0, -.1 do local b = parts["Part"] b.Transparency = i wait() end |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 09:28 PM |
21:27:20.686 - local parts = workspace.Model:GetChildren()
for i = 1, 0, :5: attempt to index local 'b' (a nil value) 21:27:20.687 - Stack Begin 21:27:20.687 - Script 'local parts = workspace.Model:GetChildren()
for i = 1, 0, ', Line 5 21:27:20.687 - Stack End |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 09:29 PM |
for i = 1,0,.1 do for _, v in pairs(game.Workspace.Model:GetChildren()) do if v:IsA"BasePart" then v.Transparency = i end end wait() end |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 09:31 PM |
the function returns a table, and the argument is nil
to get all the parts, youd do
for tran=1,0,-0.1 do children = Workspace.Model:GetChildren() for I,v in pairs(children) do if v:IsA("BasePart") or v.Name == "Part" then ypcall(function() v.Transparency = tran end end wait() end |
|
|
| Report Abuse |
|
|
| |
|