Auto Aim Error

So I’m working on a game, and here’s a line of code I’m working on:

        if (scourgetimer > 0 && pos.x < 6 && pos.x > -4)
        {
            PointTowards(bship.transform);
            PointTowards(bship.gameObject);
        
            scourgetimer -= Time.deltaTime;
        }

void PointTowards(GameObject bship) {PointTowards(bship.transform); }
    void PointTowards(Transform bship) { PointTowards(bship.position); }
    void PointTowards(Vector3 bship)
    {
        Vector3 difference = bship - transform.position;
        transform.rotation = Quaternion.LookRotation(difference.normalized, Vector3.up);
    }

Basically, this is meant to make an object find the position of the player character’s gameObject, and point towards it.

However, when I tested the script, the enemy in question just looks in a completely different angle and doesn’t move.

Is there something wrong with how I’m doing this?

I don’t see any moving code in your script.
Try this code:

void PointTowards(Transform bship){
     transform.LookAt(bship);
     transform.position = Vector3.MoveTowards(transform.position, bship.position, speed);
}

Ok, so I used this code, but when I started up the game, the enemy just teleported to the player character’s position, and it wasn’t turning at all.
However, it is shooting bullets just fine.