Directional Light Point In The Same Direction As Camera

Hello,

I am trying to make it so that my directional light is pointing to wherever my camera is pointing. I have the following script.

public class LookAtTarget : MonoBehaviour {
public Transform target;

// Update is called once per frame
void Update () {
// Rotate every frame so it keeps looking at the target
transform.LookAt(target);
}
}

I drag this script onto my Directional Light and then drag a Prefab as the target, but I cannot seem to get it working.

Any advice is appreciated.
Thanks.

just make the directional light point in the same direction as the camera in the editor, then drag it under the camera so its a child.