'Transform' does not contain a definition for 'Position'

so I’ve been trying to make my 2d enemy move towards the player, but i get this message: Assets\scripts\enemy.cs(20,60): error CS1061: 'Transform' does not contain a definition for 'Position' and no accessible extension method 'Position' accepting a first argument of type 'Transform' could be found (are you missing a using directive or an assembly reference?) this is my code so far:
{

    public float speed;
    player player;

    // Start is called before the first frame update
    void Start()
    {
        player = FindObjectOfType<player>();
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = Vector2.moveTowards(transform.Position, player.transform.position, speed * Time.deltaTime);
    }
}

,so I’m trying to make my 2d enemy move towards my player character but i get this message.
this is my code so far and i don’t see what is the problem?

{

    public float speed;
    player player;

    // Start is called before the first frame update
    void Start()
    {
        player = FindObjectOfType<player>();
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = Vector2.moveTowards(transform.Position, player.transform.position, speed * Time.deltaTime);
    }
}

I’m guessing that the code editor you are using does not have intellisense enabled, because its just a simple capitalization error in line 13. Make sure you use transform.position and not transform.Position. I recommend making sure your code editor has intellisense working. It makes errors like these way more convenient to fix.

@pizza14 no capital letters anywhere? sorry I’m very new to coding.

you should definitely enable IntelliSense, if not enabled like in this situation, you should always use method names with capital letters, like MoveTowards, in your code it’s wrong. You should use private variable names with lower case, like transform.position or transform.rotation, not Position. Your code will be fine after these implementations.

Are you sure that this script attached to any gameobject because i think this error will come if your script did not attach to any gameobject and you are trying to access its transform