Character not moving when variable is set to true

I was making this turn based game and I was trying to make a script for a button called attack which would tell the player object move = true when clicked. The player script is attached to the player object(obviously) which would get the message from the attack button and use move = true to move the player right. The problem is that the player isn’t moving at all.

script for attack button:

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

public class Attack : MonoBehaviour {

    public static bool move;

    private void OnMouseDown()
    {
        Debug.Log("Attack Script: true");
        move = true;
        StartCoroutine(wait());
        Debug.Log("Attack Script: false");
        move = false;
    }

    IEnumerator wait()
    {
        yield return new WaitForSeconds(5);
    }

    // Use this for initialization
    void Start () {
       
    }
   
    // Update is called once per frame
    void Update () {
   
       
    }
}

script for player:

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

public class Player : MonoBehaviour {

    private static bool movement;

    // Use this for initialization
    void Start () {
       
    }
   
    // Update is called once per frame
    void Update () {

        movement = Attack.move;
        Debug.Log(movement);
        if(movement == true)
        {
            transform.Translate(Vector2.right * 5f * Time.deltaTime);
        }
    }
}

Oh and I almost forgot that the delay function doesn’t delay the script for 5 seconds as I have tested via console.

delay function:

IEnumerator wait()
    {
        yield return new WaitForSeconds(5);
    }

Your StartCoroutine will return immediately and in your case do nothing. Try this instead:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Attack : MonoBehaviour {
    public static bool move;
    private void OnMouseDown()
    {
        StartCoroutine(wait());
    }
    IEnumerator wait()
    {
        Debug.Log("Attack Script: true");
        move = true;
        yield return new WaitForSeconds(5);
        move = false;
        Debug.Log("Attack Script: false");
    }
    // Use this for initialization
    void Start () {
      
    }
  
    // Update is called once per frame
    void Update () {
  
      
    }
}