Camera Movement

Hello, I am making a shoot em up game, I was wondering how can I make a camera moves up to down at a specific speed ?
It’s maybe really simple but I’m lost…

Here is a simple script that can switch the camera from going up and down with a script, or you can activate useTimer and it will use a timer to switch automatically,


    //setting if camera should move up or down
    public bool goingDown;
    //the speed of the camera
    public float speed;

    //setting if the camera should use a timer
    public bool useTimer;
    //automatic timer to switch up and down
    public float timer;
    float countdown;

    private void Update()
        //counting down
        countdown -= Time.deltaTime;

        //checking if goingDown is true
        if (goingDown)
            //moving camera move at -speed
            transform.Translate(new Vector3(0, -speed * Time.deltaTime, 0));
        } else
            //moving camera at speed
            transform.Translate(new Vector3(0, speed * Time.deltaTime, 0));

        //checking if countdown is equal or less than 0
        if (countdown <= 0 && useTimer)
            //switching goingDown
            goingDown = !goingDown;

            //resetting countdown
            countdown = timer;

    private void Start()
        //setting the countdown equal to timer
        countdown = timer;