Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

fading frame by enabling gui? [closed]

Asked by 3 years ago

how make to frame fade out when parent gui enables

Closed as Not Constructive by Nguyenlegiahung, FunctionalMetatable, and Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 3 years ago

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

0
until frame.Transparency == 0 * Gulgazar 65 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

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