How to tween all children

Whenever I want to tween a frame and all of its childs transparency, I always have to take over 10 lines of tweening and it looks messy and inefficient. Is there a better way I can do this?? (I want to tween a frame and all of its childs transparency)

You can use for loops to do it?

use for loops

for _, Child in pairs() do -- write the Parent of the child
local Tween =   -- your tween 
Tween:Play()
end
1 Like

Simple solution, I guess this is the cleanest I can get it.

Did it work for u?
Am I missing anything?

You can make it shorter using Tween:Create(tweenHere):Play()

He will still have to write a lot of for each child, So that’s why we are using for loops.

I meant replacing the 2 lines in the loop with this line of code

Oh, okay got it
Sorry for the misunderstanding.

1 Like