I have a score that increases with time. I did it by creating a function that contains a simple variable "x = x + 1;" and then having an interval set every 100ms. I have then set the variable to a text reference to show on the screen.
My problem is that when the player-object collides with something I want the score to stop and show how far the player got but at the moment the score just keeps going or display "NaH".