Transform.LookAt not rotating

I’m trying to make a turret to turn to a face a player using the Transform.LookAt function however the turret does not rotate. The code that I am using is:
static var target = Transform; Update(); function Update () { target.LookAt(GameObject.Find("Player").transform.position); }
Any help that could be given would be greatly appreciated

you’re problem is that you are calling the target to look at player. In this case, they are the same thing. Instead try putting this in your Update

transform.LookAt(GameObject.FindWithTag(“Player”).transform);