Hello, I want to know how to make like disappearing and reappearing text. Like i want the text to be displayed for a few seconds, then the text would fade and then a different text would fade up and then it keeps repeating.
Do you currently have any scripts or UI in the explorer you could provide?
You can’t ask us to make your scripts, please make one and if you need help come here!
You would need to Tween the Text transparency to 1 and then change it to other text.
Ok I tried this one
local text = This is a good day today.
Text.transparency = 0.9
Text.transparency = 0.8
Text.transparency = 0.7
Text.transparency = 0.6
Text.transparency = 0.5
Text.transparency = 0.4
Text.transparency = 0.3
Text.transparency = 0.2
Text.transparency = 0.1
end
like after that, i want another line.
That’s not really efficient, let me make one rq
Use tweens, it works better and consumes less lines.
maybe something like this?
local textLabel = -- path to TextLabel
textLabel.Text = "Your Text Here"
wait(YourWaitTime)
for i = 0, 1, 0.1 do
textLabel.TextTransparency = i
wait(0.01)
end
textLabel.Text = "Your Text Here"
for i = 1, 0, -0.1 do
textLabel.TextTransparency = i
wait(0.01)
end
Or you could tween the transparency as @AstralBlu_e suggested (much more efficient way of animating the TextTransparency)
What is the i in that line called?
It’s just a variable that contains the number that it’s currently looping through. Every time the for loop “loops” i increases by the increment (in this case, increases by 0.1)