Sorry I know this is kinda a rookie question but I have been working on this game for a while now and I need to know if there is a way to make a frame fade in then out. If you know please let me know. Thanks.
✓ ANSWER ACCEPTED
Is there a way to make a frame fade in then out?
1 answer
✓ Accepted answer
Yes, you’ve seen it occurring before. It is the act of using a for loop to iterate over the Transparency property of a Frame. Keep in mind, Transparency is a double that ranges from 0-1, therefore, we must ensure our loop iterates respectfully within said range. Using a float number, and these principals, we can increment and decrement the Transparency values to give the effect of "fading".
--// Basic application of theory
local Player = game:GetService("Players").LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui:WaitForChild("ScreenGui")
local Frame = ScreenGui:WaitForChild("Frame")
for t = 0,1,.1 do wait(.1)
Frame.BackgroundTransparency = t
end
for t = 1,0,-.1 do wait(.1)
Frame.BackgroundTransparency = t
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thank you!