How to make speed changable

Hi, I’m fairly new to programing, and here is my character movement script

// Update is called once per frame
void Update()
    Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0.0f);

    animator.SetFloat("Horizontal", movement.x);
    animator.SetFloat("Vertical", movement.y);
    animator.SetFloat("Magnitude", movement.magnitude);

    transform.position = transform.position + movement * Time.deltaTime;

    bool flipped = movement.x < 0;
    this.transform.rotation = Quaternion.Euler(new Vector3(0f, flipped ? 180f : 0f, 0f));

but my character moves very slow and I can’t find where I can change the speed. What line(s) of code should I add/change to allow me to do that?


Your character changes position with

transform.position = transform.position + movement * Time.deltaTime;

So you need to increase this vector

transform.position = transform.position + movement * Time.deltaTime * Speed;

And give speed the value you want.