access variables across 2 scripts

So I’ve been making a 2d platformer game in Unity (c#) and I have a variable in my playerMovement script called “isDashing”, that I want to access in my healthManager script, so that the player would only take damage if the player isn’t dashing.
Code Snippet from playerMovement:

public class Move : MonoBehaviour
    {
        private bool isDashing;
    
        ....
    
    }

Code Snippet from healthManager:

public class health : MonoBehaviour
{
    private bool isDashing;
    void Awake()
    {
        isDashing = GameObject.FindObjectOfType<Move>().GetComponent<Move>().isDashing;
    }

The code didn’t return any errors, but it doesn’t do anything. I’ve already tried out th solutions of other posts, but no luck. I have just started learning how to use Unity, so please I would really appreciate your help.
Thanks in advance.

this question is already been asked

Answer here