How to set a Collider of a GameObject to Inactive similar to the SetActiveMethod

I am curious as to how I could set a component/collider to inactive and active again after a period of time has passed. I’m trying to do this to make up for the hindsight I had for an animation I had created for many characters where they jump but the collider would stay stay still and run into things that would cause damage to the player.

Here is the code I am working on:

using UnityEngine;
using System.Collections;

public class PlayerMovement : MonoBehaviour 

	public float movementSpeed = 10.0f;
	public float angleChangeSpeed = 100.0f;

	public bool isDead = false;
	private float minX = -15.0f;
	private float maxX = 15.0f;
	private float minZ = 0.0f;
	private float maxZ = 20.0f;

	private GameObject playerCharacter;

	void Start()
		playerCharacter = GameObject.FindGameObjectWithTag ("PlayerCharacter");

	// Update is called once per frame
	void Update () 
			transform.localPosition = new Vector3(Mathf.Clamp(transform.localPosition.x, minX, maxX), 0, 
			                                 Mathf.Clamp(transform.localPosition.z, minZ, maxZ));
			// new code
			float horizontal = Input.GetAxis ("Horizontal");
			float vertical = Input.GetAxis ("Vertical");

			Vector3 direction = new Vector3 (horizontal, 0, vertical);
			Vector3 finalDirection = new Vector3 (horizontal, 0, 1.0f);

			transform.position += direction * movementSpeed * Time.deltaTime;

			transform.rotation = Quaternion.RotateTowards (transform.rotation, Quaternion.LookRotation (finalDirection), Mathf.Deg2Rad*angleChangeSpeed);

		if (!isDead) 
			if (Input.GetButton ("Jump"))
				playerCharacter = GameObject.GetComponent<Collider>.SetActive(false);
				//I know this code doesn't work, it is pseudocode to get my point across

	void SetDead(bool dead)
		Debug.Log ("SetDead was reached");
		isDead = dead;

	void ResetPosition()
		transform.localPosition =;

If anyone could give me advice on this matter that would be awesome and thank you.

Hum… So if I understand you correctly you just want to try to turn off your Collider? You could do this with:

this.GetComponent<SphereCollider>().enabled = false; //This could work for almost any component

So when your not on the ground you could run this code.