Issue with enemies going towards player

I’m having a little issue with my enemies at the moment, I want my coloured balls to roll towards the player, but at the moment, they just seem to roll to the position in the photo, regardless of where my player is.

Does anyone know why this may be? Here is the code I’m using:

using UnityEngine;
using System.Collections;

public class moveTowardsPlayer : MonoBehaviour 
{
	public Transform target; // drag the player here
	float speed = 10.0f; // move speed
	
	void Update()
	{
		transform.position = Vector3.MoveTowards(transform.position, target.position, speed * Time.deltaTime);
	}
}

Since I suppose the question is answered, I’ll post the complete answer here for anyone who might have the same problem:

The problem was that the enemies were referencing a Prefab and not the instanciated gameobject.

The solution was to attach the tag “Player” to the cube and then make sure the enemies were referncing it at the beginning of the scene like so:

using UnityEngine;
using System.Collections;
 
public class moveTowardsPlayer : MonoBehaviour 
{
    public Transform target; // drag the player here
    void Start()
    {
       target = GameObject.FindGameObjectWithTag("Player").transform;
    }
 
    float speed = 10.0f; // move speed
 
    void Update()
    {
        transform.position = Vector3.MoveTowards(transform.position, target.position, speed * Time.deltaTime);
    }
}