Test if Controller has Clicked

Hey! So basically what I am trying to do is make my version of a melee system.
``It is not perfect but I am playing around with the concept because it is simple and easy to understand. Basically, I have a sphere that acts as the collider. The sphere is there to act as a way to tell if the enemy is within reach of the player. You could also use raycasting, but I feel that this way is more simple.

Basically, on the sphere I have a script that detects if the sphere is colliding with the enemy (a cube for now) AND the player has pressed left-click. However, since the script is on the sphere, I need to access the FPSController to detect if the mouse has been clicked. How should I go about doing that? I am new to Unity, and I am mostly playing around with basic concepts, so if you could explain the proper use of GetComponent in this situation I would REALLY appreciate it!

NOTE: I use C#, so if you could explain it to me in C# terms that would be highly appreciated!!!

I believe Input.GetMouseButtonDown(0) should work, even from within the sphere.
I would assign a bool to equal that and then test to see if both your in-range variable and the above variable are true using the || symbol (conditional AND, only checks the second one if the first one is true.)
otherwise, the syntax for accessing another script is as follows:

public GameObject objectVariableName;
public nameOfScript scriptVariableName;

// then, in the update function:

objectVariableName = GameObject.Find("name of the gameobject");
nameOfScript scriptVariableName = objectVariableName.GetComponent<nameOfScript>();