How to assign auto target with tag in range?Help!

Hello! I ask you something, how do I assign to the variable “Target” each object with a tag in a shooting range? Thank you!

using UnityEngine;
using System.Collections;

public class LookTarget : MonoBehaviour {

	public Transform target;
	
	void Update()
	{
		// Rotate the camera every frame so it keeps looking at the target
		transform.LookAt(target);
	}
}

First of all you should edit target as array:

 public Transform[] target;

Then you should find all the GameObjects with GameObject.FindGameObjectsWithTag. Check the distances of these objects then add to your target variable.