My enemies stack and do not use gravity

I Am making a fps shooter when my enemies follow me they stack and don’t use gravity I have all the stuff you need for a enemy and they are prefabs this is the script `//set the values in the inspector
public Transform target; //drag and stop player object in the inspector
public float within_range;
public float speed;
private float time;

public void Update()
    if(time == 1f)
        //get the distance between the player and enemy (this object)
        float dist = Vector3.Distance(target.position, transform.position);
        //check if it is within the range you set
        if (dist <= within_range)
            //move to target(player) 
            transform.position = Vector3.MoveTowards(transform.position, target.transform.position, speed);
        //else, if it is not in rage, it will not follow player
    time = Time.timeScale;

who ever answers with best answer I will respond to their next question if possible

If you want to have gravity available for an object, you need to add a RigidBody component. Also if you gonna move an object with that component, you probably want to move the object by changing the object’s velocity.

Here are a couple of references:

An extra note:

If you gonna modify the velocity, try to do that in a FixedUpdate method.