Object Collision Countdown

I am trying to create a small and short third person view game, where the main object (Infected) collides with other objects (human) in order to “infect” them. After all human objects have been collided with and changed color, I would like that to trigger a “load scene.” I have been trying to use the score and UI approach as a Countdown but that doesn’t seem to work. Any help/direction would be greatly appreciated.,I am trying to create a third person view game that when the main object (player) collides into other objects (human) they “infect them.” With that I am trying to make a countdown in order to move on to the next level. In the first level I have two objects (humans) to be infected. after both objects have been collided with and their color changed I want that to trigger a load scene.

Are you having trouble with the countdown or loading the scene?

Loading the scene uses LoadScene(), so for example:

SceneManager.LoadScene(1);

or

SceneManager.LoadScene(scoretally);

The former uses an int corresponding to the desired scene’s place in the build index, while the latter uses a string corresponding to the desired scene’s name. Make sure to have “using UnityEngine.SceneManagement;” at the start of the script, so you can use SceneManagement stuff.

Regarding the countdown, you can do something as simple as

timeRemaining -= Time.deltaTime;
if (timeRemaining <= 0.0f){
    SceneManager.LoadScene(scoretally);
}