|
| 04 Jul 2017 03:25 PM |
How would I create a smooth Color3 transition from one color to another without stopping the code to finish the loop?
bamboozled again |
|
|
| Report Abuse |
|
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 04 Jul 2017 03:35 PM |
What do you mean without stopping the code? You can use the color3 lerp method.
'''Lua local colour3A, colour3B; -- set these... for i = 0, 100 do local interpolationColour3 = colour3A:lerp(colour3B, i/100); end; ''' |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2017 03:36 PM |
Yeah but I have to wait till the for loop ends
bamboozled again |
|
|
| Report Abuse |
|
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 04 Jul 2017 03:43 PM |
You can use spawn:
'''Lua spawn(function () local colour3A, colour3B; -- set these... for i = 0, 100 do local interpolationColour3 = colour3A:lerp(colour3B, i/100); end; end); '''
Although I would highly recommend trying to get it to run without another thread. Things can get messy fast. |
|
|
| Report Abuse |
|
|