title: Timer does not invalidate
body: <p>I can not invalidate a Swift Timer.</p>
  
  <p>When defining my objects and variables I declare the timer with</p>
  
  <pre><code>var scoreTimer = Timer()
  </code></pre>
  
  <p>I start the timer when two objects collide with this line:</p>
  
  <pre><code>scoreTimer = Timer.scheduledTimer(timeInterval: 0.05, target: self, selector: #selector(updatePassengerScore), userInfo: nil, repeats: true)
  </code></pre>
  
  <p>My updatePassengerScore method looks like this</p>
  
  <pre><code>    passengerScore -= 1
      scoreLabel.text = String(passengerScore)
  </code></pre>
  
  <p>When another collision is detected, I try to stop the timer with</p>
  
  <pre><code>scoreTimer.invalidate()
  </code></pre>
  
  <p>but the variable passengerScore is still decreasing and I do not have a clue why this is the case.
  Does anyone have a clue hoe to solve this and make the Timer stop? Every Thread I read says that scoreTimer.invalidate() should actually stop the timer. I am really confused :-/</p>