Problems with adding multiple conditions

I have an If statement that will make the player jump once, I don’t see what I am doing wrong at the moment. Here is the code:

#pragma strict

var jumpforce : float = 50.0;
var isgrounded : boolean = true;

function Update () {

    if(Input.GetKeyDown("space") && isgrounded = true){
        rigidbody.AddRelativeForce (0,jumpforce ,0);
        isgrounded = false;
    }

}

I would be grateful if anyone could point out my mistake :slight_smile:

Thanks in advance.

isgrounded = true

You need two equal signs: ==