while wait() do
logo.ImageColor3 = Color3.new(0.1, 0.1, 0.1)
wait()
logo.ImageColor3 = Color3.new(0.2, 0.2, 0.2)
wait()
logo.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
wait()
logo.ImageColor3 = Color3.new(0.4, 0.4, 0.4)
wait()
logo.ImageColor3 = Color3.new(0.5, 0.5, 0.5)
wait()
logo.ImageColor3 = Color3.new(0.6, 0.6, 0.6)
wait()
logo.ImageColor3 = Color3.new(0.7, 0.7, 0.7)
wait()
logo.ImageColor3 = Color3.new(0.8, 0.8, 0.8)
wait()
logo.ImageColor3 = Color3.new(0.9, 0.9, 0.9)
wait()
logo.ImageColor3 = Color3.new(1, 1, 1)
wait()
logo.ImageColor3 = Color3.new(0.9, 0.9, 0.9)
wait()
logo.ImageColor3 = Color3.new(0.8, 0.8, 0.8)
wait()
logo.ImageColor3 = Color3.new(0.7, 0.7, 0.7)
wait()
logo.ImageColor3 = Color3.new(0.6, 0.6, 0.6)
wait()
logo.ImageColor3 = Color3.new(0.5, 0.5, 0.5)
wait()
logo.ImageColor3 = Color3.new(0.4, 0.4, 0.4)
wait()
logo.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
wait()
logo.ImageColor3 = Color3.new(0.2, 0.2, 0.2)
wait()
logo.ImageColor3 = Color3.new(0.1, 0.1, 0.1)
wait()
logo.ImageColor3 = Color3.new(0.2, 0.2, 0.2)
wait()
logo.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
wait()
logo.ImageColor3 = Color3.new(0.4, 0.4, 0.4)
wait()
logo.ImageColor3 = Color3.new(0.5, 0.5, 0.5)
wait()
logo.ImageColor3 = Color3.new(0.6, 0.6, 0.6)
wait()
logo.ImageColor3 = Color3.new(0.7, 0.7, 0.7)
wait()
logo.ImageColor3 = Color3.new(0.8, 0.8, 0.8)
wait()
logo.ImageColor3 = Color3.new(0.9, 0.9, 0.9)
wait()
logo.ImageColor3 = Color3.new(1, 1, 1)
wait()
logo.ImageColor3 = Color3.new(0.9, 0.9, 0.9)
wait()
logo.ImageColor3 = Color3.new(0.8, 0.8, 0.8)
wait()
logo.ImageColor3 = Color3.new(0.7, 0.7, 0.7)
wait()
logo.ImageColor3 = Color3.new(0.6, 0.6, 0.6)
wait()
logo.ImageColor3 = Color3.new(0.5, 0.5, 0.5)
wait()
logo.ImageColor3 = Color3.new(0.4, 0.4, 0.4)
wait()
logo.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
wait()
logo.ImageColor3 = Color3.new(02, 0.2, 0.2)
wait()
logo.ImageColor3 = Color3.new(1, 1, 1)
wait()
button.Visible = true
break
end
Is there an easier way I can write this transition?
2 answers
Ultimately, you want it to go up from (.1, .1, .1) to (1, 1, 1), in .1 increments, and then back down the same way.
Doing this requires 2 separate for loops.
Lastly, you want to repeat the whole process above 3 times, which can be done by engulfing the whole thing in yet another for loop.
for loop structure
for x = startValue, endValue, increment do
end
the increment is defaulted to 1 if not specified
Below I make a few variables at the top, just for editing convenience.
local small = .1
local big = 1
local inc = .1
local dec = -.1
local reps = 3
--this loop repeats everything in it 3 times
for _ = 1, reps do
-- this loop goes from .1 to 1
for c = small, big, inc do
logo.ImageColor3 = Color3.new(c, c, c)
wait()
end
-- this loop goes from 1 to .1
for c = big, small, dec do
logo.ImageColor = Color3.new(c, c, c)
wait()
end
end
button.Visible = true
Hi. Use for loops, or tweeningservice, but i'm not sure if that works for color3.
for i = 0,1,0.1 do -- the first parameter is the "start", the second is the "end", and the third is the increment, or how much you want it to increase each "time", change it to whatever you seem fitting.
logo.ImageColor = Color3.new(i,i,i)
end
wait(0) -- how many seconds you'd like
for i = 1,0,-0.1 do -- again, but we are going "down" now.
logo.Imagecolor = Color3.new(i,i,i)
end
This should work. Thanks.
7 comments
The first part of the script works to a certain point, then it just goes black and stops working.
I thought that was what you wanted? I mean, it goes from 0 to 1, then from 1 to 0, what exactly do you want it to be?
It doesn't go from 1 to 0, it breaks after 0 to 1
Then just erase everything after the first "end" including the wait() but not the end.
Now it just stays black.
change the "1" to 255. 255 should make it go from black to white changing in grey tones.
Still doesn't seem to work. Thanks anyway.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Do you want it to go on forever? What exactly is the intended result?
Just for about 3 seconds.