Coroutine and instantiate problem!

I have a problem in unity C# with my code, I have an error in instantiate inside a coroutine! Here’s my code:

using System.Collections;
using UnityEngine;

public class Enemies : MonoBehaviour
{
    public float betweenSpawns;
    public bool stop;
    public GameObject Prefab;
    public Transform enemy;
    public PlayerMovement movement;


    public void OnCollisionEnter(Collision col)
    {
        //Debug.Log(gameObject.name + " Has collided with " + col.gameObject.name);
        Time.timeScale = 0.5f;
        stop = true;
        if (Input.GetKey("r"))
        {
            Time.timeScale = 1;
            stop = false;

        }
    }

   
   



    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(Spawner(enemy));
    }

    // Update is called once per frame
    IEnumerator Spawner(Transform enemy)
    {


        while (!stop)
        {

            Vector3 spawnPosition1 = new Vector3(Random.Range(-37.5f, -18.75f), 25, 0);
            Vector3 spawnPosition2 = new Vector3(Random.Range(-18.75f, 0), 25, 0);
            Vector3 spawnPosition3 = new Vector3(Random.Range(0, 18.75f), 25, 0);
            Vector3 spawnPosition4 = new Vector3(Random.Range(18.75f, 37.5f), 25, 0);

            //here problem with instantiate!
            Instantiate(Prefab, spawnPosition1 + transform.TransformPoint(0, 0, 0), 0, 0, 0);
            Instantiate(Prefab, spawnPosition2 + transform.TransformPoint(0, 0, 0), 0, 0, 0);
            Instantiate(Prefab, spawnPosition3 + transform.TransformPoint(0, 0, 0), 0, 0, 0);
            Instantiate(Prefab, spawnPosition4 + transform.TransformPoint(0, 0, 0), 0, 0, 0);


            yield return new WaitForSeconds(betweenSpawns);
        }

    }
}

What is the error, and on what line is the error?

51 - 54

and problem is no overload for method instantiate takes 5 arguments

What is the + sign for in the instantiate method? You are indeed passing 5 params which is invalid syntax Unity - Scripting API: Object.Instantiate

Param list:

  1. Prefab
  2. spawnPosition4 + transform.TransformPoint(0, 0, 0)
  3. 0
  4. 0
  5. 0

thanks but I am new to unity so I don’t know much and I don’t know what I exactly need to change.

You need to change the number of parameters. Review the link that I provided for the specific syntax. Can you clarify what you intended the + sign to do for you?

I want to have it something like this:
instantiate (prefab, spawnPosition1, 0, 0, 0,)
but then I get an error the same saying No overload for method instantiate takes 5 arguments!

Thanks for your help now I have my line like this
Instantiate (Prefab, spawnPosition1, enemy.rotation)