Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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!

3 comments

0

It did not work still, its just fading through part. I want all the model parts to fade all at once.

0

@iDoctor Was that aimed at me?

0

Yes It was. I am trying to make a game called Doctor Who and its about this person who travels in a TARDIS.

1 answer

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

5 comments

0

It did not work...

0

Don't just post code! Explain what you're doing in detail! https://scriptinghelpers.org/help/how-post-good-questions-answers

2

Perci, See all those comments that say what does what? That's called explaining.

1

The comments say what that piece of code is doing, but they do not explain and teach it.

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.