ERROR CS0201,error CS0201

Making a racing game already got the movement and camera to follow the player im working on a feature where if the player holds down the space key there speeds increase but i keep getting this error.

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

public class PlayerController : MonoBehaviour
    public float speed = 5.0f;
    public float turnspeed;
    public float horizontalInput;
    public float forwardInput;

    // Update is called once per frame
    void Update()
        horizontalInput = Input.GetAxis("Horizontal");
        transform.Rotate(Vector3.up, Time.deltaTime * turnspeed * horizontalInput);
        forwardInput = Input.GetAxis("Vertical");
        transform.Translate(Vector3.forward * Time.deltaTime * speed * forwardInput); 
        bool held = Input.GetKey(KeyCode.Space);

        if (held)
            speed * 2.0f;

For future reference: i think almost noone knows error codes. Please instead when you encounter an error, don’t just post “CS0201” → post the error message and most importantly: highlight the line in your code where it occurs.

For this issue it is okay as we can spot it here:

      speed * 2.0f;

This line does a multiplication of speed by 2 → but you don’t save that anywhere.

so either write

     speed *= 2.0f;


     speed = speed * 2.0f;

and it will work.