Help making this UI fade out smoothly

Hello, I have this script:

task.wait(3)

game.TweenService:Create(script.Parent, TweenInfo.new(1), {Offset = Vector2.new(1, 0)}):Play()

task.wait(3)

script.Parent.Offset = Vector2.new(-1, 0)

script.Parent.Transparency = NumberSequence.new({
	NumberSequenceKeypoint.new(0, 1),
	NumberSequenceKeypoint.new(1, 0)
})

game.TweenService:Create(script.Parent, TweenInfo.new(1), {Offset = Vector2.new(1, 0)}):Play()

and this is the structure:

image

which results in:

now my question is, how do I make it so the black frame disappears with a smooth fade out effect after the text has displayed?

Thanks in advance

task.wait(3)

game.TweenService:Create(script.Parent, TweenInfo.new(1), {Offset = Vector2.new(1, 0)}):Play()

task.wait(3)

script.Parent.Offset = Vector2.new(-1, 0)

script.Parent.Transparency = NumberSequence.new({
	NumberSequenceKeypoint.new(0, 1),
	NumberSequenceKeypoint.new(1, 0)
})

game.TweenService:Create(script.Parent, TweenInfo.new(1), {Offset = Vector2.new(1, 0)}):Play()
task.wait(2)
game.TweenService:Create(script.Parent.Parent.Parent, TweenInfo.new(1.5), {BackgroundTransparency = 1}):Play()

Thank you very much and thanks for the fast reply!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.