2D game - Advanced AI follow script

First of all sorry for my bad english, isn’t my mother language. I want to make a game for my univeristy diploma.
It would be a 2D game type Endless Runner. On the screen would appear a Player and an Enemy. Both of them will be moving in the right direction, and the player can move up and down to avoid Obstacles. The Enemy must follow the player everytime(if the Player goes up avoiding an Obstacle so should the Enemy by following the path of the player). I’ve created the Player movement script and two Enemy scripts for that.

My problem is that the Enemy isn’t follow the exact path of the player. If the Player goes up, the Enemy goes up, but not on the exact path. If i make the player to go up and down fast by avoiding an Obstacle, the Enemy follow the path of the Player and get stuck in the Obstacle.
Can someone help me? or adjust my scripts?
Thank you so much,
Andrei
Player movement script

using UnityEngine;
using System.Collections;

public class Miscare : MonoBehaviour {

    public Sprite playerSprite;
    public float speed = 1f;
    public float moveForce = 2.0f;
    private Vector3 moveDirection = Vector3.zero;
    public float forwardMovementSpeed = 3.0f;
    private float NewSpeed;
    // Use this for initialization
    void Start () {
       
    }
   
    // Update is called once per frame
    void Update () {
       
        if (Input.GetKey (KeyCode.W))
            transform.position += new Vector3 (0.0f, speed * Time.deltaTime, 0.0f);
        if (Input.GetKey (KeyCode.S))
            transform.position -= new Vector3 (0.0f, speed * Time.deltaTime, 0.0f);
        moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
        moveDirection = transform.TransformDirection(moveDirection);
        moveDirection *= speed;
        transform.Translate(Vector3.forward * Input.GetAxis("Vertical") * Time.deltaTime*speed);
        Vector2 newVelocity = rigidbody.velocity;
        newVelocity.x = NewSpeed;
        rigidbody.velocity = newVelocity;
        NewSpeed = forwardMovementSpeed + speed;
       
    }
   
   
}

Enemy scripts:

using UnityEngine;
using System.Collections;

public class Enemy : MonoBehaviour
{

    public float Speed = 0;
    private Transform _playerTransform;
    private Transform _myTransform;

    void Start()
    {
      
        var player = GameObject.FindGameObjectWithTag("Player");
        if (!player)
        {
            Debug.LogError(
                "Could not find the main player. Ensure it has the player tag set.");
        }
        else
        {
        
            _playerTransform = player.transform;
        }
        _myTransform = this.transform;
    }
    void Update()
    {
     
        var moveAmount = Speed * Time.deltaTime;
        _myTransform.position = Vector3.MoveTowards(_myTransform.position,
                                                    _playerTransform.position, moveAmount);
    }
}
using UnityEngine;
using System.Collections;

public class move : MonoBehaviour
{
    public Vector2 speed = new Vector2(10, 10);
    public Vector2 direction = new Vector2(1, 0);
    private Vector2 movement;
   
    void Update()
    {
        movement = new Vector2(
            speed.x * direction.x,
            speed.y * direction.y);

    }
   
    void FixedUpdate()
    {
        rigidbody2D.velocity = movement;
    }
}

this pathfinder helps you Unity Asset Store - The Best Assets for Game Making
Unity Asset Store - The Best Assets for Game Making

You could try setting points at each spot the player goes up or down & then when the enemy hits those points they go up or down as needed. Perhaps a pool of objects that have triggers (but turn the mesh off so they are invisible) that get instantiated with a script that tells the enemy when to go up or down once they collide with it. After the last enemy collides with it return it to the pool.