I made a script that should change the background color of my main menu but it doesnt work.
Does anyone know why, and how to fix it?
It's supposed to loop forever but it only changes it to red and then yellow and it stops.
local A = 250
local B = 0
local C = 0
while 1 + 1 == true do
repeat
script.Parent.BackgroundColor3 = (Color3.new(A, B, C))
B = B + 25
wait(0.2)
until B == 250
repeat
script.Parent.BackgroundColor3 = (Color3.new(A, B, C))
A = A - 25
wait(0.2)
until A == 0
repeat
script.Parent.BackgroundColor3 = (Color3.new(A, B, C))
C = C + 25
wait(0.2)
until C == 250
repeat
script.Parent.BackgroundColor3 = (Color3.new(A, B, C))
B = B - 25
wait(0.2)
until B == 0
repeat
script.Parent.BackgroundColor3 = (Color3.new(A, B, C))
A = A + 25
wait(0.2)
until A == 250
end
Thank you for your time.

3 comments
Good catch, but his while loop poses more of a problem lol
Woops, didn't even see that, lmao
Thanks :D