Help Accurately Changing Lanes in 3-Lane Runner

I’ve created this movement script which controls switching lanes in a 3-lane system, but noticed that where the x-value of the player should either be -2, 0, or 2 (This is where I get the velocity of (-)8 for 1/4 of a second), it is within a range of +/- .05, and the gap just gets bigger to either side.
How could I go about getting an exact x-value from my player’s movement?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class movePlayer : MonoBehaviour
{
    public KeyCode moveL;
    public KeyCode moveR;

    public float horizVel = 0;

    public int laneNum = 2;
    private string controlLocked = "n";

    // Start is called before the first frame update
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
        GetComponent<Rigidbody>().velocity = new Vector3(horizVel, 0, 4);

        if (Input.GetKeyDown(moveL) && laneNum > 1 && controlLocked == "n")
        {
            horizVel = -8;
            StartCoroutine(stopSlide());
            laneNum -= 1;
            controlLocked = "y";

        }

        if (Input.GetKeyDown(moveR) && laneNum < 3 && controlLocked == "n")
        {
            horizVel = 8;
            StartCoroutine(stopSlide());
            laneNum += 1;
            controlLocked = "y";

        }
    }


    IEnumerator stopSlide()
    {
        yield return new WaitForSeconds(0.25f);
        horizVel = 0;
        controlLocked = "n";
    }
}

Don’t base it on time, base it on the current position. That way it will constantly be correcting itself.
Each of your lanes has a fixed number for X, correct? So set those numbers here:

public float[] laneXPositions = new float{ 0f, 2f, 4f };
public int laneNum = 0;

And do all of your velocity setting in Update, without any coroutines.

bool controlLocked = false;
void Update() {
if (!controlLocked) {
if (Input.GetKeyDown(moveL) ) {
laneNum--;
controlLocked = true;
}
if (Input.GetKeyDown(moveR) ) {
laneNum++;
controlLocked = true;
}
laneNum = Mathf.Clamp(laneNum, 0, laneXPositions.Length);
}
float currentX = transform.position.x;
float targetX = laneXPositions[laneNum];
float horizVel = 0f;
//first, check to see if we're really close
if (Mathf.Abs(currentX - targetX) < 0.05f) {
controlLocked = false;
horizVel = 0f;
}
else if (targetX < currentX) {
horizVel = -8f;
}
else if (targetX > currentX) {
horizVel = 8f;
}
GetComponent<Rigidbody>().velocity = new Vector3(horizVel, 0, 4);
}

This works great, but upon start it shoots the player to the far side of the right lane, and then I can only switch between lanes 2 and 3. I thought maybe this had to do with the array having values 0-4 instead of -2 through 2… but that doesnt seem to be it. Can’t see anything that would be causing this