I'm trying to make it so it fades the colors from red to green to blue but it gets stuck on green without any errors
local startgreen = false
local startred = true
local startblue = false
local redvalue = script.Parent.TextColor3.r
local greenvalue = script.Parent.TextColor3.g
local bluevalue = script.Parent.TextColor3.b
--red
coroutine.wrap(function()
while startred == true do
for i = 0, 255, 5 do
script.Parent.TextColor3 = Color3.new(i/255,greenvalue,bluevalue)
wait(1/30)
end
wait(2)
startgreen = true
for i = 255,0, -5 do
script.Parent.TextColor3 = Color3.new(i/255,greenvalue,bluevalue)
wait(1/30)
end
startred = false
end
end)()
--green
coroutine.wrap(function()
while startgreen == true do
for i = 0, 255, 5 do
script.Parent.TextColor3 = Color3.new(redvalue,i/255,bluevalue)
wait(1/30)
end
wait(2)
startblue = true
for i = 255,0, -5 do
script.Parent.TextColor3 = Color3.new(redvalue,i/255,bluevalue)
wait(1/30)
end
startgreen = false
end
end)()
--blue
coroutine.wrap(function()
while startblue == true do
for i = 0, 255, 5 do
script.Parent.TextColor3 = Color3.new(redvalue,greenvalue,i/255)
wait(1/30)
end
wait(2)
startred = true
for i = 255,0, -5 do
script.Parent.TextColor3 = Color3.new(redvalue,greenvalue,i/255)
wait(1/30)
end
startblue = false
end
end)()

2 comments
i c i c, although you helped making all the fading, the whole fading the the right color doesn't work and it just ends on black without looping
I'll edit my script so it does this continuously.