Coroutine yield return new Waitforseconds not working

Here’s my code:

		if(CubeScript.startSpeed <= 25){	
			StartCoroutine("IncSpeed");	
			
		}

And my coroutine:

IEnumerator IncSpeed(){
	Debug.Log("before");
	yield return new WaitForSeconds(5);
	Debug.Log("after");
	
}

It debugs “Before” in the console, but not “after”. Am I not using this coroutine correctly?

I failed to realize the script was being destroyed in the process. Thanks, though! I appreciate the help. :slight_smile: