How can I update my scoreboard one point at a time ?

If a player receives X amount of points for doing something in my game I want the scoreboard to update showing each number from 0 - X very briefly. I’m going for an analog style scoring system like those old clocks where you can watch the numbers change, except the change will happen quickly because hundreds of points can be added at the same time.

Currently, X amount of points are updated instantly when points are awarded:

/****************************** Platform Collision ***************************/

void OnCollisionEnter2D(Collision2D coll)
		foreach(ContactPoint2D contact in coll.contacts)
			newPlayerHeight = transform.position.y;

			// Don't count the first jump
			if(newPlayerHeight < 0){
				newPlayerHeight = 0;

			// If the player jumps down, don't reduce points
			// Add a tolerance for variable collision positions on same platform
			if(newPlayerHeight < oldPlayerHeight + -0.05f){
				newPlayerHeight = oldPlayerHeight;

			// Send the height to the Score class

			oldPlayerHeight = newPlayerHeight;

/******************************* Score class *********************************/

public void updateScore (float newScore)
		// Display GUI score
		score = (int)(newScore * 76);
		guiText.text = "Score" + score;


I messed around with a for-loop to try and achieve this but got nowhere close.

You could do something simple like this:

float scoreTimer = 0.0f;
float score = 0.0f;
float scoreGain = 0.0f;
bool gotPoints = false;

   scoreTimer += Time.deltaTime;
   if(scoreTimer >= .01f)
       score += 1;
       scoreTimer = 0.0f;
   if(score >= scoreGain)
       gotPoints = false;

void killedAnEnemyOrSomething() //this is whatever you do that makes you gain points.
    scoreGain += //whatever points you want it to gain.
    gotPoints = true;

So basically, you trigger gotPoints by doing whatever it is that gives you points. Then it adds how much it is going to gain to the score in scoreGain. Next it adds a point every .1 second until it reaches whatever number scoreGain is.

I didn’t do this in unity so there could be a syntax error that I missed or something, but the general idea should work. =P