I'm making a character controller but can't figure out why jumping wont work.

The script (c# in visual studio)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
public float speed = 1;
public float jumpForce = 1;
private Rigidbody2D _rb;
void Start()
{
_rb = GetComponent();
}

void Update()
{
    var movement = Input.GetAxis("Horizontal");
    transform.position += new Vector3(movement, 0, 0) * Time.deltaTime * speed;

    if(Input.GetKeyDown)KeyCode.Space) && Mathf.Abs(_rb.velocity.y) < 0.001f)
    {
        _rb.AddForce(new Vector2(0, jumpForce), ForceMode2D.Impulse);
    }
}

}

It’s a very simple mistake…it’s not Input.GetKeyDown)KeyCode.Space)…it’s Input.GetKeyDown(KeyCode.Space)…as you can see…you have used a flipped bracket there…hope this helps