I found out that this should make the enemy follow the player. But it doesn’t update and only goes to where the player originally was
void Update()
{
transform.position = Vector3.MoveTowards(transform.position, player.transform.position, speed*Time.deltaTime);
transform.LookAt(player.transform.position);
}
There is also this as well
// Vector3 lookDirection = (player.transform.position - transform.position).normalized;
// transform.Translate(lookDirection*speed);
This also does the same thing only moves over to where the player originally was.