Why is every monster set to attacking me when only one is in range?

I set the AttackDistance to 3, meaning 1.5x the players height/width, and give up distance to 5, meaning 2.5x the players height/width

 using UnityEngine;
    using System.Collections;
    
    public class Attacking : MonoBehaviour {
    
    	// Connected game objects
    	private GameObject PrimaryTarget;
    	private Follower SecondaryTarget;
    
    	// Basic properties
    	public int Damage;
    	public int Health;
    	public float Speed;
    
    	// Basic distance floats
    	public float GeneralDistance;
    	public float AttackDistance;
    	public float GiveUpDistance;
    	public float AttackRange;
    
    	// Advanced distance floats
    	private float Distance;
    	private float FollowerDistance;
    
    	private Follower CurrentFollowerGet;
    
    	// Grab player
    	private Player PlayerScriptGet;
    	private GameObject PlayerGet;
    
    	// Decides whether or not the monster can attack
    	private bool CanAttack;
    
    	// Sets up the state machine where the monster decides what it wants to do
    	private enum PlayerFollowerGiveUp {Player, Follower, GiveUp};
    	private PlayerFollowerGiveUp AttackState;
    
    	void Start () {
    		PlayerGet = GameObject.Find ("Player");
    
    		PrimaryTarget = PlayerGet;
    
    		// Allows the monster to deal damage as soon as the game is started
    		CanAttack = true;
    	}
    
    	void Update () {
    		// Gives "Advanced distance floats" code
    		Distance = Vector2.Distance (PrimaryTarget.rigidbody2D.transform.position, rigidbody2D.transform.position);
    	
    		if (SecondaryTarget)
    		{
    			SecondaryTarget = CurrentFollowerGet;
    			FollowerDistance = Vector2.Distance (SecondaryTarget.rigidbody2D.transform.position, rigidbody2D.transform.position);
    		}
    
    		PlayerScriptGet = PlayerGet.GetComponent <Player> ();
    
    		// If the monster sees the player in range
    		if (Distance <= AttackDistance)
    		{
    			// The monster will attack the player
    			AttackState = PlayerFollowerGiveUp.Player;
    		}
    
    		// If the monster sees the follower in range and the follower is closer
    		if (FollowerDistance < AttackDistance && FollowerDistance < Distance && SecondaryTarget)
    		{
    			AttackState = PlayerFollowerGiveUp.Follower;
    		}
    
    		// If the monster sees neither the player or follower
    		if (Distance >= GiveUpDistance && FollowerDistance >= GiveUpDistance)
    		{
    			// The monster will give up on attacking the player and the follower
    			AttackState = PlayerFollowerGiveUp.GiveUp;
    		}
    
    		// If the monster is following the follower
    		if (AttackState == PlayerFollowerGiveUp.Player)
    		{
    			// If the player's x value is greater than the sum of the monster's x value and the general distance set
    			if (PrimaryTarget.rigidbody2D.transform.position.x > rigidbody2D.transform.position.x + GeneralDistance)
    			{
    				// Move the monster to the right to catch up with the player
    				rigidbody2D.transform.position += Vector3.right * Speed * Time.deltaTime;
    			}
    			// If the player's x value is less than the difference between the monster's x value and the general distance set
    			if (PrimaryTarget.rigidbody2D.transform.position.x < rigidbody2D.transform.position.x - GeneralDistance)
    			{
    				// Move the monster to the left to catch up with the player
    				rigidbody2D.transform.position += Vector3.left * Speed * Time.deltaTime;
    			}
    			// If the player's y value is greater than the sum of the monster's y value and the general distance set
    			if (PrimaryTarget.rigidbody2D.transform.position.y > rigidbody2D.transform.position.y + GeneralDistance)
    			{
    				// Move the monster up to catch up with the player
    				rigidbody2D.transform.position += Vector3.up * Speed * Time.deltaTime;
    			}
    			// If the player's y value is less than the difference between the monster's y value and the general distance set
    			if (PrimaryTarget.rigidbody2D.transform.position.y  < rigidbody2D.transform.position.y - GeneralDistance)
    			{
    				// Move the monster down to catch up with the player
    				rigidbody2D.transform.position += Vector3.down * Speed * Time.deltaTime;
    			}
    
    			// If the player is in the range of an attack and the monster hasn't attacked in the past second
    			if (Distance <= AttackRange && CanAttack == true)
    			{	
    				// Do everything mentioned in the "Attack" function
    				AttackPlayer ();
    			}
    		}
    
    		if (AttackState == PlayerFollowerGiveUp.Follower)
    		{
    			// If the follower's x value is greater than the sum of the monster's x value and the general distance set
    			if (SecondaryTarget.rigidbody2D.transform.position.x > rigidbody2D.transform.position.x + GeneralDistance)
    			{
    				// Move the monster to the right to catch up with the follower
    				rigidbody2D.transform.position += Vector3.right * Speed * Time.deltaTime;
    			}
    			// If the follower's x value is less than the difference between the monster's x value and the general distance set
    			if (SecondaryTarget.rigidbody2D.transform.position.x < rigidbody2D.transform.position.x - GeneralDistance)
    			{
    				// Move the monster to the left to catch up with the follower
    				rigidbody2D.transform.position += Vector3.left * Speed * Time.deltaTime;
    			}
    			// If the follower's y value is greater than the sum of the monster's y value and the general distance set
    			if (SecondaryTarget.rigidbody2D.transform.position.y > rigidbody2D.transform.position.y + GeneralDistance)
    			{
    				// Move the monster up to catch up with the follower
    				rigidbody2D.transform.position += Vector3.up * Speed * Time.deltaTime;
    			}
    			// If the follower's y value is less than the difference between the monster's y value and the general distance set
    			if (SecondaryTarget.rigidbody2D.transform.position.y  < rigidbody2D.transform.position.y - GeneralDistance)
    			{
    				// Move the monster down to catch up with the follower
    				rigidbody2D.transform.position += Vector3.down * Speed * Time.deltaTime;
    			}
    		}
    	}
    
    	void Die () {
    	}
    
    	void AttackPlayer () {
    		// Change the current health of the target to the difference between the current health and the damage set
    		PlayerScriptGet.Health -= Damage;
    
    		// Start the coroutine that delays the attack
    		StartCoroutine (AttackDelay ());
    	}
    
    	IEnumerator AttackDelay () {
    		// The monster cannot attack
    		CanAttack = false;
    
    		// Wait one second
    		yield return new WaitForSeconds (1);
    
    		// The monster can attack again
    		CanAttack = true;
    	}
    }

You’ve defined AttackState as a PlayerFollowerGiveUp, and enum you’ve declared as {Player, Follower, GiveUp}.

Enums are actually integers under the hood, which are a value type.

Therefore, they are always initialized to their default value. The default value for an integer is zero.

The value of the enum when it is zero (Enums, by default, count up from zero when declared) is Player.

Therefore, since you don’t initialize the value, all Attacker scripts start with a AttackState of Player.

I expect you’d find that if you actually went ahead and waited until they entered and then left the zone that they would (almost) work correctly. (You have a logic error with your if order)

tl; dr

Add

AttackState = PlayerFollowerGiveUp.GiveUp;

in your Start() method.

Following notes

The easiest way to debug problems is to have many short methods instead of few long ones. There should be almost no reason for you to ever have to post 170 lines of code. Try breaking your long functions into short ones… you’ll find things easier to fix yourself, and see opportunities to reduce code duplication.

Debug.Log() is your friend. Sprinkle it liberally throughout your code for all values that might even just possibly affect the outcome. This should have been your first step, and I bet you would’ve caught this immediately.