running animation looping issue

Hello, Currently I am making a First Person Game. I have a Punching animation which works fine and I have a running animation that lasts for 1.25 sec. The running animation plays upon “W” keypress but then stops. How can I get the animation to continuously loop until W is no longer being pressed or is halted by other animation playing (such as the punching animation).

Thanks Guys.

(Sorry if this a noob question I’m only new.)

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

public class punch : MonoBehaviour
{
    public GameObject Arms;



    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Punch"))
        {
            Arms.GetComponent<Animator>().Play("PunchRight");
        }

        if (Input.GetButtonDown("Run"))
            Arms.GetComponent<Animator>().Play("Running");
    }


}

Hi, i’m newbie too but i think an idea could be to trigger the animation not when “W” is pressed but while the movement speed is greater than 0. Actually i don’t know how with 3d works because i’m learning 2d and for the running animation i used this method. Example:
If (movementSpeed > 0){
//Play Run Animation
{
Where movementSpeed is " float moveHorizontal = Input.GetAxisRaw(“Horizontal”);" in the update function so i get a value between -1 and 1 that represent going left and going right
I easily did this with the Animator Controller like this video: