Syntax error on FollowPath

I’m following a youtube tutorial on making a simple stealth game, it’s for an assignment that’s due Saturday. I’ve followed everything to a T and haven’t had any problems until now.

any idea what is causing mine to get an error? I’ve looked over the entire line of code almost 10 times and everything is exactly as in the video. Yet I’m getting this error every time. Any help would be appreciated. I’m running out of time

IEnumerator needs a return type

So simply return a yield in follow path function like

    IEnumerator followPath()
        //If you wanna stop the script for few seconds
              Yield return new waitforseconds(float time);
//        Or, simply return
              Yield return 1;

yield return null; for C#. Or yield return new WaitForEndOfFrame();