Bool to float error (c#)

I’m using this script to control my character in a 2.5D side scrolling platformer with this script the character can move side to side but can’t jump. what I’m trying to do is allow the player to jump but the script cant convert the bool input from input.getkey to a float value for the vector3 so the editor comes up with the errors

"Assets/PlayeController.cs(26,75): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments"

"Assets/PlayeController.cs(26,75): error CS1503: Argument `#1' cannot convert `bool' expression to type `float'"

is there a way to make the jump bool into a float (or vice versa)

here is the code;

using UnityEngine;
using System.Collections;

public class PlayeController : MonoBehaviour {
		
		public float speed;
		public float jumpHeight;

		private Rigidbody rb;
		
		void Start ()
		{
			rb = GetComponent<Rigidbody>();
		}
		
		void FixedUpdate ()
		{
			float moveHorizontal = Input.GetAxis ("Horizontal");
			
			Vector3 movement = new Vector3 (moveHorizontal, 0.0f, 0.0f);
			
			rb.AddForce (movement * speed);
			
			bool jump = Input.GetKey ("Jump");

			Vector3 jumping = new Vector3 (0.0f, jump, 0.0f);

			rb.AddForce (jumping * speed);
		}
	}

You can’t just transform a bool into a float.
You have to start by deciding what you want your vector to be when a key is pressed and when it’s not: does false correspond to 0 ? Or perhaps -1 ? What about true ? Is it 1 or 2 or perhaps 10? The compiler can’t know that so it’s you who has to make the choice - an if statement or such

bool jump = Input.GetKey ("Jump");
float yValue = 0f;
if( jump ) yValue = 1;//or whatever
Vector3 jumping = new Vector3 (0.0f, yValue, 0.0f);