I am trying to script a color changing smoke but it either rapidly changes, goes over 255 or under 0 and then doesn't change back, is there any way to make it so it smoothly changes color without it flashing or going over 255 or under 0? This is the script I was using:
number1 = math.random()
number2 = math.random()
number3 = math.random()
while wait() do
script.Parent.Smoke1.Smoke.Color = Color3.new(number1,number2,number3)
script.Parent.Smoke2.Smoke.Color = Color3.new(number1,number2,number3)
number1 = math.random()
number2 = math.random()
number3 = math.random()
end
Is there any way to make it kind of fade to random colors or is this the best I can do?

6 comments
I have tried to use this, for calling the function I used: TweenColor3(script.Parent.Smoke1.Smoke.Color,Color3.new(math.random(0,255),math.random(0,255),math.random(0,255)),script.Parent.Smoke1.Smoke.Color,5) -- Is this correct?? I was confused.
It won't work automatically, you're going to have to set 'Output' on line 10 to whatever you want to change.
I did put script.Parent.Smoke.Smoke1.Smoke.Color
I'm pretty sure you have to divide the values in your second argument (the random color) by 255 as Color3s have a range between 0 and 1.
Worked with editing but no vote up because I had to edit and it's copied from kingkiller1000 Color3 Tween script without credit.
Just because it might look similiar to someone else's doesn't mean it's copied(: There's not that broad a spectrum for ways to do this, you know. But i'm glad it worked for you.