Camera following problem

Im making a top down RPG and dont have much experience with scripts, i have 2 Scripts so far one for moving(click to move) and a camera follow script.

This is the click to move script

using UnityEngine;
using System.Collections;

public class moveToClikc : MonoBehaviour {

    public float speed;
    public CharacterController controller;
    private Vector3 position;

    // Use this for initialization
    void Start ()
    {
        position = transform.position;
    }
  
    // Update is called once per frame
    void Update () {

    if(Input.GetMouseButton(0))
        {
            locatePosition();
        }

        moveToPosition();
    }

    void locatePosition()
    {
        RaycastHit hit;
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        if(Physics.Raycast(ray, out hit, 1000))

        {
            position = new Vector3(hit.point.x, hit.point.y, hit.point.z);
        }

    }

    void moveToPosition()
    {
        if (Vector3.Distance(transform.position, position)>2)
        {
            Quaternion newRotation = Quaternion.LookRotation(position - transform.position);

            newRotation.x = 0f;
            newRotation.z = 0f;

            transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, Time.fixedDeltaTime = 10);
            controller.SimpleMove(transform.forward * speed);
        }
    }
}

And here is the camera script

using UnityEngine;
using System.Collections;

public class CameraFollow : MonoBehaviour {

    public Transform target;
    public float smoothing = 5f;

    Vector3 offset;

    void Start ()
    {
        offset = transform.position - target.position;
    }

    void FixedUpdate ()
    {
        Vector3 targetCamPos = target.position + offset;
        transform.position = Vector3.Lerp (transform.position, targetCamPos, smoothing * Time.deltaTime);
   
}
    }

When I use the Camera script with a simple move script(move with WASD) it works, but when i use the Click to move script the camera script doesn’t work

please paste code into the forums and use the tags, make it readable, add line numbers etc. (generally people don’t like following links :P), there is a sticky on them at the top of the scripting forum

any errors being thrown? did a quick skim and I couldn’t see any obvious problems in there…

No errors, when the player moves the camera doesn’t follow, thats all. I have the camera script attached to the camera and the target selected

I set the fixedUpdate to just Update in the camera script, now it seems to work