Hello everyone, today I was testing my skills and wanted to make a faded text for example, I wrote this:
wait(5)
script.Parent.Frame.Visible = true
wait(3)
script.Parent.Frame.Visible = false
wait(3)
script.Parent.Frame1.Visible = true
wait(3)
script.Parent.Frame1.Visible = false
wait(3)
script.Parent.Frame2.Visible = true
wait(3)
script.Parent.Frame2.Visible = false
But how do I make it fade?
2 Likes
IuaNerd
(IuaNerd)
2
Try
for i = 1,10 do
wait()
script.Parent.Frame.Transparency = i/10
end
wait(3)
and copy it for all your lines.
1 Like
You’re in luck! as this is an actual function in roblox studio, simply use game:GetService(“TweenService”) and all the tools should be available to you. here is a link https://developer.roblox.com/en-us/api-reference/class/Tween
2 Likes
Simply Do:
game:GetService("TweenService")
part = script.Parent.Frame
goal = {Transparency = 1}
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
Thank you for the reply but @IuaNerd 's is more simple, i started like 2 weeks ago.
Do i do it on every line? 30char
No Problem! Hope your game turns out great!
1 Like
That code alone does it all for you, jsut change the number after TweenInfo.new to set the amount of time (in seconds) the tween will be.
Alright thank you so much for the help.
1 Like
you can also simply do this:
wait(5)
while wait() do
script.Parent.Transparency = script.Parent.Transparency + 0.05
end
IuaNerd
(IuaNerd)
11
This is a endless loop. Wouldnt be too good to use. You would need to make a repeat until loop for this to work correctly.
1 Like
oh yeah you are right sorry i forgot