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

fading frame by enabling gui?

how make to frame fade out when parent gui enables

2 answers

Misinterpreted your question as a request. You could use a simple loop to increase transparency every X seconds

for i = 1,10 do
	wait(0.05)
	--do thing
end

OR

repeat wait(0.05)
	--do thing
until frame.Transparency == 1

A repeat until loop

1 comment

0

until frame.Transparency == 0 *

I Suggest You Use A Tween , Do It Like This

local TweenService = game:GetService("TweenService")

First, We Get The Tween Service, Then After That, We Make Info By

local Info = TweenInfo.new()

You can learn What to put on Parenthesses on :

https://developer.roblox.com/en-us/api-reference/datatype/TweenInfo

After You Make the Info, What You Want to Do Is call A Reference For A Gui, Example

local Gui = script.Parent

Or wherever the GUI might be

Now Create A Goal, I usually make a table since i got used to it since i watched TheDevKing Videos

local Goal = {
	Transparency = 1
}

Now We Create, And Play The Tween By Using

local FadeOutTween = TweenService:Create(Gui , Info , Goal)
FadeOutTween:Play()

When using :Create(), The First Parameter Will be the Instance, Or What Part You Want to Change, Since We Want to Change GUI transparency to 1 smoothly, We put GUI, Second Parameter is the Info, Which We already made by Using "TweenInfo.new()", Third Parameter is the Goal, Or What Property You Want to Change Smoothly

To Learn More, Go Here

https://developer.roblox.com/en-us/api-reference/class/Tween

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