Ulxqra
(Ulxqra)
1
How would I make a frame so it starts off black and slowly fades to white then repeats?
could I make a script like this?
local r = 0
local g = 0
local b = 0
while true do
r = r +1
b = b +1
g = g+1
wait(0.1)
end
script.Parent.BackroundColor3 = FromRGB(r,g,b)
1 Like
Iifebit
(Lifebit)
2
You would have to use tween service.
Ulxqra
(Ulxqra)
3
Like tween the color?
I do not do tweening and I do not understand.
Iifebit
(Lifebit)
4
Here is a example code I whipped up in a minute:
local tweenservice = game:GetService("TweenService")
while true do
wait(0.5)
local tweeninfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local tween = tweenservice:Create(script.Parent, tweeninfo, {BackgroundColor3 = Color3.fromRGB(255, 255, 255)})
tween:Play()
tween.Completed:Wait()
local tween2 = tweenservice:Create(script.Parent, tweeninfo, {BackgroundColor3 = Color3.fromRGB(0,0,0)})
tween2:Play()
tween2.Completed:Wait()
end
2 Likes
Ulxqra
(Ulxqra)
5
Wouldnt this just make it black then white instantly?
Iifebit
(Lifebit)
6
Look at this API. It explains tweening much better than I can:
1 Like
Ulxqra
(Ulxqra)
7
Script worked, thanks a lot @MegaFireball0!
Iifebit
(Lifebit)
8
No problem! Glad I could help!