Enemy stops where player spawn (Navigation help)

I baked a NavMesh and all that jazz and added a script for my “zombies” to go to my destination, but they just go to where I spawned and stand there?

My code on the enemy is:

    public Transform Player;
    
    void Update()
    {
        GetComponent<NavMeshAgent>().destination = Player.position;
    }

They navigate correctly, avoiding obstacles and all, but just stop at my spawn position. The “Zombies” are prefabs if that matters and my player is also a prefab. Any help would be greatly appreciated!

Try using the following:

public Transform Player;
private NavMeshAgent agent;

 void Awake() {
    agent = GetComponent<NavMeshAgent>();
 }

 
 void Update()
 {
     agent.SetDestination(Player.position);
 }

I would also recommend only to update when the player actually moves instead of in update.

Hope it helps!