Can't attach the Player GameObject in my Animator Script

I’m trying to make an animator script for idle and walk animations. I’m using Get component in the animator to interact with my player movement script but when I try to make it public to attach the player gameObject in the animator script it just dosn’t show. It’s saying that Player has no reference, so the GetComponent cannot execute