Moving Platform with delay not working

I about to go nuts trying to figure out why my MovingPlatform script won’t actually pause/delay.

I get no errors, and my Debug.Log info executes correctly, but my platform is NOT delaying when moving from one Waypoint to another.

What am I missing?

***HELP PART 2: I want to move the “delayTimer” and actually add it to each Transform that is created from the line “public Transform Waypoints;” Is there a way to do that? That way, the user could add a delay to some waypoints, and leave some at 0.

ANYWAY… Thank you for looking and helping me understand where my brain is failing me =)

using UnityEngine;
using System.Collections;

public class MovingPlatform : MonoBehaviour 
{
	public Transform[] Waypoints;
	public float moveSpeed = 3;
	public float rotateSpeed = 0.5f;
	public float scaleSpeed = 0.5f;
	public float delayTimer = 3;
	public int CurrentPoint = 0;
	

	IEnumerator timeToDelay()
	{
		Debug.Log("Delay timer activated...");
		yield return new WaitForSeconds(delayTimer);
		Debug.Log("Delay timer completed!");
	}

	void FixedUpdate () 
	{
		if (transform.position != Waypoints [CurrentPoint].transform.position) 
		{
			transform.position = Vector3.MoveTowards (transform.position, Waypoints [CurrentPoint].transform.position, moveSpeed * Time.deltaTime);
			transform.rotation = Quaternion.Lerp (transform.rotation, Waypoints [CurrentPoint].transform.rotation, rotateSpeed * Time.deltaTime);
			transform.localScale = Vector3.Lerp (transform.localScale, Waypoints [CurrentPoint].transform.localScale, scaleSpeed * Time.deltaTime);
		}
		
		if (transform.position == Waypoints [CurrentPoint].transform.position) 
		{
			StartCoroutine(timeToDelay());
			CurrentPoint += 1;
		}

		if( CurrentPoint >= Waypoints.Length)
		{
			CurrentPoint = 0;
		}
	}
}

Instead of using IEnumerator try setting up your own wait (at least that’s what I always do).

For example this is one of my waits for jumping:

Hope it helps

if(Input.GetButtonDown("Jump") && jumpdelay < Time.time)
        {
            Invoke("Jump", 0f);
            jumpdelay = Time.time + 0.6f;
        } 

P.S. 0.6f is in seconds.

I’ve decided to edit your code because it might be a bit complicating so put this:

There may be a couple of typing errors but they’ll be easy to correct.

using UnityEngine;
 using System.Collections;
 
 public class MovingPlatform : MonoBehaviour 
 {
     public Transform[] Waypoints;
     public float moveSpeed = 3;
     public float rotateSpeed = 0.5f;
     public float scaleSpeed = 0.5f;
     public float delayTimer = 3;
     public int CurrentPoint = 0;

     //New Float
     public float delay;
 
     void FixedUpdate () 
     {
         if (transform.position == Waypoints [CurrentPoint].transform.position) 
         {
             delay = Time.time + delayTimer;
         } else if (transform.position != Waypoints [CurrentPoint].transform.position && delay < Time.time) 
         {
             transform.position = Vector3.MoveTowards (transform.position, Waypoints [CurrentPoint].transform.position, moveSpeed * Time.deltaTime);
             transform.rotation = Quaternion.Lerp (transform.rotation, Waypoints [CurrentPoint].transform.rotation, rotateSpeed * Time.deltaTime);
             transform.localScale = Vector3.Lerp (transform.localScale, Waypoints [CurrentPoint].transform.localScale, scaleSpeed * Time.deltaTime);
         }
 
         if( CurrentPoint >= Waypoints.Length)
         {
             CurrentPoint = 0;
         }
     }
 }