Player isn't moving.

I don’t know what’s preventing my player from moving, does anybody know?

[SerializeField] private float speed;
[SerializeField] private float jumpPower;
[SerializeField] private LayerMask groundLayer;
[SerializeField] private LayerMask wallLayer;
private Rigidbody2D body;
private Animator anim;
private BoxCollider2D boxCollider;
private float wallJumpCooldown;
private float horizontalInput;
private float thrust = 30f;
private float impulse = 10f;

private void Awake()
    body = GetComponent<Rigidbody2D>();
    anim = GetComponent<Animator>();
    boxCollider = GetComponent<BoxCollider2D>();

private void Update()
    float horizontalInput = Input.GetAxis("Horizontal");

    if (horizontalInput > 0.01f)
        transform.localScale =;
    else if (horizontalInput < -0.01f)
        transform.localScale = new Vector3(-1, 1, 1);

    anim.SetBool("Running", horizontalInput != 0);
    anim.SetBool("grounded", isGrounded());
    anim.SetBool("onWall", onWall());

    if (wallJumpCooldown > 0.2f)
        body.velocity = new Vector2(horizontalInput * speed, body.velocity.y);

        if (Input.GetKey(KeyCode.Space))
    wallJumpCooldown = Time.deltaTime;

private void Jump()
    if (isGrounded())
        body.velocity = new Vector2(body.velocity.x, jumpPower);
    else if (onWall() && !isGrounded())
        //Here is the wall Jump
        body.velocity = new Vector2(-Mathf.Sign(transform.localScale.x) * 16, 14);
        wallJumpCooldown = 0.2f;

private void OnCollisionEnter2D(Collision2D collision)

private bool isGrounded()
    RaycastHit2D raycastHit = Physics2D.BoxCast(, boxCollider.bounds.size, 0, Vector2.down, 0.1f, groundLayer);
    return raycastHit.collider != null;

private bool onWall()
    RaycastHit2D raycastHit = Physics2D.BoxCast(, boxCollider.bounds.size, 0, new Vector2(transform.localScale.x, 0), 0.1f, wallLayer);
    return raycastHit.collider != null;

After debugging your script I have found that wallJumpCooldown is never > 0.2f you need to lower that value. 0.001f worked fine on my side.,After debugging your code I have found that walljumpCooldown is never greater than 0.2f so never enter the if condition set it to some lower value 0.001f worked fine for me. @gmarti08

You arent telling it to move (you are sorta telling it to change its local scale but thats about it as far as I can see)

Never mind guys, I fixed it! Just made a simple typo lol