Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How can I make my model fade disapear with getchildren()?

Asked by 9 years ago

t = game.Workspace.TARDIS:GetChildren() for i,v in pairs(t) do for i = 0, 1, 0.1 do v.Transparency = i wait(0.1) end end -- Not fading all at once. It's fading 1 parts to another. I want it to fade all at once!

0
It did not work still, its just fading through part. I want all the model parts to fade all at once. iDoctorW 0 — 9y
0
@iDoctor Was that aimed at me? Spongocardo 1991 — 9y
0
Yes It was. I am trying to make a game called Doctor Who and its about this person who travels in a TARDIS. iDoctorW 0 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago
local Model = game.Workspace.TARDIS

for i,v in pairs(Model:GetChildren()) do --Collects all the items in the model.
if v:IsA("Part") then --Checks to make sure that item is a part.
coroutine.resume(coroutine.create(function() --When the script is read, roblox runs this function while reading everything else after it.
for i = 1, 10 do --Loops 10 times.
t.Transparency = t.Transparecy + 0.1 --Keeps making the part disappear.
wait(0.1)
end
end))
end
end
0
It did not work... iDoctorW 0 — 9y
0
Don't just post code! Explain what you're doing in detail! https://scriptinghelpers.org/help/how-post-good-questions-answers Perci1 4988 — 9y
2
Perci, See all those comments that say what does what? That's called explaining. xImmortalChaos 565 — 9y
1
The comments say what that piece of code is doing, but they do not explain and teach it. Perci1 4988 — 9y
0
Yeah make sure you're actually teaching it :/ What if some people don't know about some of these things? Also you should really tab it right. ZeptixBlade 215 — 9y
Ad

Answer this question