FPS Aim bot Script

Ive been editing a standard FPS demo that comes with SFS2x and I wanted to include an aim bot which I would later develop into a targetting system. The code is as follows

Code:

if(Input.GetKeyDown("t")) { 
            GameObject go = GameObject.FindGameObjectWithTag("Enemy"); 
            target = go.transform; 
             
            transform.LookAt(target); 
            //transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(target.position - transform.position), rotationSpeed * Time.deltaTime); 
         }   

I attached this to the update part of the mouse look script and no compiler errors occurred however clicking T does nothing. I can see that the target of the player clone does infact become an enemy clone(I added the enemy tag of course) however there is no alteration to the camera. This is in C# but the issue seems to be no camera rotation so if anyone could help id appreciate it, thanks.

you could try attaching the camera to a spher with a rigidbody that has freeze position all cheaked and gravity uncheaked.

Try Input.GetKeyDown(Keycode.T) instead.