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?