How to make Moving Gradient
First and for most, you need to know how to use
ColorSequence.new()
. My script is not smooth, but it works. Sorry about that. When I make a fully modular script, ill update this posrt
How ColorSequence Works
So ColorSequence has 2 parameters. The first parameter is the position of the color (anywhere from 0 - 1). The second parameter is the color, this part is to tell at what color should display.
Moving Gradient
To make a Moving Gradient, what you do is you use a while loop, and change the values for each time it has to move. To make not stress about what I said, I will give you the basic script
- Insert a ScreenGui
- Insert a TextLabel under ScreenGui. Make the BackgroundTransparency to 1, TextScaled to true, and TextColor3 to (255,255,255)
- Insert a UIGradient under TextLabel
- Insert a LocalScript under TextLabel
- Insert a NumberValue under LocalScript , and name it speed, this is value is to tell how fast the gradient should move. Play around with this value. (WARNING! - Make sure the spelling is
speed
) - Paste this code in LocalScript
local red
local orange
local yellow
local green
local blue
local blue
local finish
local rainbow
while wait() do
local speed = script.speed.Value
red = ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(.2, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(.4, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(.5, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(.6, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(.8, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({red, orange, yellow, green, blue, purple, finish})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(.4, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(.5, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(.6, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(.8, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({finish, red, orange, yellow, green, blue, purple})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(0.4, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(.5, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(.6, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(.8, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(1, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({purple, finish, red, orange, yellow, green, blue})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(0.5, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(.6, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(.8, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(1, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(0, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0.4, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({blue, purple, finish, red, orange, yellow, green})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(0.6, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(.8, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(1, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(0, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(0.4, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0.5, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({green, blue, purple, finish, red, orange, yellow})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(0.8, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(0, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(0.4, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(0.5, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0.6, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({yellow, green, blue, purple, finish, red, orange})
script.Parent.UIGradient.Color = rainbow
wait(speed)
red = ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 4))
orange = ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 214, 47))
yellow = ColorSequenceKeypoint.new(0.2, Color3.fromRGB(251, 255, 6))
green = ColorSequenceKeypoint.new(0.4, Color3.fromRGB(28, 255, 26))
blue = ColorSequenceKeypoint.new(0.5, Color3.fromRGB(44, 93, 255))
purple = ColorSequenceKeypoint.new(0.6, Color3.fromRGB(255, 26, 252))
finish = ColorSequenceKeypoint.new(0.8, Color3.fromRGB(255, 0, 213))
rainbow = ColorSequence.new({orange, yellow, green, blue, purple, finish, red})
script.Parent.UIGradient.Color = rainbow
wait(speed)
end
Please reply to this post if you have any questions