My script is not moving my animation Zombie forward - onlu idle

I am following a tutorial and have written the following code to make my zombie walk in the game. He will move in olace (idke) but not move forward on the nav mesh?

Thanks

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class ZombieAI : MonoBehaviour 
{
    NavMeshAgent agent;
    Transform target;
    Animator anim;


    // Use this for initialization
    void Start () 
    {
        target = GameObject.FindGameObjectWithTag("Player").transform;
        agent = GetComponent<NavMeshAgent> ();
        anim = GetComponent<Animator> ();
    }
    
    // Update is called once per frame
    void Update () 
    {
        float distance = Vector3.Distance (transform.position, transform.position);

        if (distance > 1.5) 

        {
        agent.updatePosition = true;
        agent.SetDestination(target.position);
        anim.SetBool ("isWalking", true);
        anim.SetBool ("isAttacking", false);
            
        }

    else 

    {
    agent.updatePosition = false;                
    anim.SetBool ("isWalking", false);
    anim.SetBool ("isAttacking", true);
    }

}
}

Thanks.

There doesn’t appear to be anything wrong with the script, so it’s probably your animation controller setup. Recheck the spelling of the booleans and go back over that part of the tutorial. I’m assuming there are no errors being shown. Sometimes you just have to go back over a tutorial and double check everything.

So I went back through it

There was no idle I created a state called Idle
Bool isWalking
Bool isAttacking
Trigger isDead

Idle to walk - isWalking {true}
walk to idle - isWalking {false}

idle to attack - isAttacking {true}
attack to idle - sAttacking(false}

Nothing happens if I start over and just do the idle to walk and reverse above he walks in place???

I do see this at times

KeyNotFoundException:The given key was not present in the dictionary.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Found it

line 26 should have said .(… target.position )