How to make Moving Gradient

Could u elaborate on your question

1 Like

I mean as simple as making the text black and white gradient instead of a rainbow gradient? Just wondering how hard it would be to make it a black and white pattern.

1 Like

one of the easiest ways to do that would probably be just using the one he shows in the post but with only black and white

2 Likes

You can refer to this comment How to make Moving Gradient - #16 by vastqud

1 Like

question to our pro’s:
how can i extend (width) the gradient and back again?
I am currently using this script:

local RS = game:GetService("RunService")
local rainbow = script.Parent  -- GUI object
local grad = rainbow.UIGradient

local counter = 0       -- phase shift 
local w = math.pi / 12  -- frequency 
local CS = {}           -- colorsequence table
local num = 15 			-- number of colorsequence points (maxed at 15 or 16 I believe)
local frames = 0		-- frame counter, used to buffer if you want lower framerate updates

RS.Heartbeat:Connect(function()
	if math.fmod(frames, 2) == 0 then
		for i = 0, num do
			local c = Color3.fromRGB(127 * math.sin(w*i + counter) + 128, 127 * math.sin(w*i + 2 * math.pi/3 + counter) + 128, 127*math.sin(w*i + 4*math.pi/3 + counter) + 128)
			table.insert(CS, i+1, ColorSequenceKeypoint.new(i/num, c))
		end
		grad.Color = ColorSequence.new(CS)
		CS = {}
		counter = counter + math.pi/40
		if (counter >= math.pi * 2) then
			counter = 0
		end
	end
	if frames >= 1000 then
		frames = 0
	end
	frames = frames + 1
end)
1 Like

I am not sure what your question is. But if you are asking how to increase the time it takes to change to another color, then maybe change the w variable or counter variable.

1 Like