StartCoroutine not listening to parameters

Hello, I’m using the following code, but once I hit play it immediatly runs as if dead = true (It disables the rigidbody, but doesn’t reanable it and restart, it’s just stuck at “You died” displayed). I couldn’t find an answer anywhere else so I decided to open a new question.

public class PlayerController : MonoBehaviour {

public bool dead = false;
void Start ()

	deathText.text = "";  

	StartCoroutine (Death());  

IEnumerator Death()
	if (dead = true) 
		BeforeDeath ();
		yield return new WaitForSeconds (2.0f);
		AfterDeath ();

You mean to do if (dead == true) in place of if (dead = true)
Otherwise you assign the value true to dead, you need to use == to make a comparison.