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

How to make ALL the children of a ScreenGui fade?

I'm new to using :GetChildren(). I have a bunch of smaller labels and such under a frame, and whenever I try to do something like script.Parent:GetChildren().Transparency = nothing happens. How do I make a gradual fade?

1 answer

GetChildren() will return a table of children. You are going to need to iterate throughout the table and for a smooth fade, use tween service.

local TweenService = game:GetService(‘TweenService’)

for _, Object in next, script.Parent:GetChildren() do
     if Object:IsA(‘GuiObject’) then
          TweenService:Create(Object, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
     end
end

3 comments

0

it they are ui elements id recommend using TweenPosition and TweenSize instead of tweenservice

0

ForeverBrown but he wants it to faaaadddeeeeeeeeeeee not move or resize

0

damn, you right.

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