I have tried using a fading frame script, but however after the frame fades away the letters still appear. I have tried looking for something to put inside of the text boxes but they disappear late…
I have no clue on why this is doing it, I have tried putting the TextBox.Parent thing inside but those come up with a script error.
I have tried looking for solutions but haven’t found nothing, can anyone help me please?
If you would like to fade out frames, text, and text boxes together, the best practice would be to tween them. Here’s some starter code I made.
local TweenService = game:GetService("TweenService")
local animInfo = TweenInfo.new(
1, --length of tween
Enum.EasingStyle.Linear --type of tween
)
local textbox = --write your path to your textbox
local frame = --write your path to your frame
local textFade = TweenService:Create(textbox, animInfo, {TextTransparency = 1}) --fading out text
local textboxFade = TweenService:Create(textbox, animInfo, {BackgroundTransparency = 1}) --fading out textbox's background
local frameFade = TweenService:Create(frame, animInfo, {BackgroundTransparency = 1}) --fading out frame
textFade:Play()
textboxFade:Play()
frameFade:Play()
I think your script should work but why do you have a colon after do? That should mess it up if I am correct. I’m not sure if it is a spelling error or what thought.
local TweenService = game:GetService("TweenService")
TweenIt = function(Object, Changes, Time, Reversing, EasingStyle)
local Info = TweenInfo.new(
Time,
EasingStyle or Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
0, -- Times repeteated
Reversing or false, -- Reversing
0 -- Time Delay
)
local Action = TweenService:Create(Object, Info, Changes)
return Action
end
function AlterTransparency(Gui, Transparency)
for i, v in pairs(Gui:GetDescendants()) do
if v:IsA"ImageLabel" or v:IsA"ImageButton" then
TweenModule.TweenIt(v, {ImageTransparency = Transparency}, .5):Play()
elseif v:IsA"TextLabel" or v:IsA"TextButton" then
TweenModule.TweenIt(v, {TextTransparency = Transparency, TextStrokeTransparency = Transparency}, .5):Play()
end
end
end
Usage:
AlterTransparency(MyScreenGui, 1)
In Action:
I was working in something in which I made this so why not