I can't get my animation to play. can someone help

every time i press play then press Fire1 to play my animation it gives me two warnings, they are “Animator.GotoState: State could not be found
UnityEngine.Animator:Play (string” And “Invalid Layer Index ‘-1’
UnityEngine.Animator:Play (string)” My code is:

  1. using System.Collections.Generic;
    using UnityEngine;
    using System.Collections;

public class AttackSequence : MonoBehaviour

public GameObject Tanjiros_Nirichin_sword;

// Update is called once per frame
void Update()
    if (Input.GetButtonDown("Fire1"))

void AttackAnim ()


And yes i am making a demon slayer game because you can clearly see this in my code

“public GameObject Tanjiros_Nirichin_sword;”


I fixed my problem. but… i can only play the animation once after that if i push the button to activate it it does nothing i will attach a video of it P.S. i will ad a debug.log so you know when am pushing the button.

Video Of My Problem /