title: Making number transitions smooth
body: <p>I have a variable that, when function is called, gets multiplied by 1.01. What I want is, instead of just seeing that variable "jump" to another value, to see it smoothly and gradually increase until it reaches that value.</p>
  
  <p>Example:</p>
  
  <pre><code>    x = 1000
      function gets called
      x = x * 1.01 
  --&gt; x value is now 1010, but when I show it on screen, I would like it to go 1000, 1001, 1002,...,1010 in certain amount of time
  --&gt; instead of just 1000 -&gt; 1010
  </code></pre>
  
  <p>My code so far:</p>
  
  <pre><code>function Multiply()
                  local random = math.random(1, 102)
                      if random ~= 1 then
                          Multiplier = Multiplier * 1.01
                          MultiplierDisplay.text = "x" .. string.format("%.3f", Multiplier)
  
                          Gain = Multiplier * PlaceYourBetTextField.text - PlaceYourBetTextField.text
                          GainDisplay.text = "Gain: " .. string.format("%.0f", Gain)
                      else
                          timer.cancel(MultiplyTimer)
                          Multiplier = 1
                      end
                  end
                  MultiplyTimer = timer.performWithDelay(125, Multiply, 0)
  </code></pre>