waiting before player is moved to spawn? C#

here is my code that is attached to my player, this is a very simple game as its my first Unity Project.

when my player hits certain objects he dies, and by dies i mean the player is just moved back to the starting position. i want the player to disappear for 3 seconds before he is moved back to the starting position here is my code;

death is called in OnTriggerEner or OnCollisonEnter the player is moved to the spawn but instantly,

public void Death ()
    	{
    	ReSpawn ();
                //spawn is private Vector3 spawn = transform.possition;
		transform.position = spawn;
	}
    IEnumerator ReSpawn ()
    	{
    		gameObject.SetActive (false);
    		yield return new WaitForSeconds (5);
    		gameObject.SetActive (true);
    	}

any clue as to why this does not work im at beginner-ish level

Because you need to start the coroutine for this WaitForSeconds().

So … you need just to when he got hitted on OnTriggerEnter to put StartCoroutine(ReSpawn).

See this too: StartCoroutine