Turn Off Capsule Collider via JavaScript

Hello Guys! I’m new to unity, and I’m having a problem! I want to turn off the Capsule Collider from a GameObject via JavaScript, wait a few seconds and turn it on again, but i don’t know how to turn it on or off… can you guys help me?

#pragma strict

function Start () {
}

function Update () 
 {}

function OnCollisionEnter(hit : Collision)
{
if(hit.gameObject.tag  ==  "ClimbHighTrigger")
moverparaheroi.colisao = 0;
********TURN OFF CAPSULE COLLIDER HERE******
yield WaitForSeconds (3);
myComponent = true;
********TURN ON CAPSULE COLLIDER HERE*******
moverparaheroi.colisao = 1;
}

You could set/clear collider.enabled :

function OnCollisionEnter(hit : Collision)
{
  if(hit.gameObject.tag  ==  "ClimbHighTrigger"){
    moverparaheroi.colisao = 0;
    collider.enabled = false;
    yield WaitForSeconds (3);
    myComponent = true;
    collider.enabled = true;
    moverparaheroi.colisao = 1;
  }
}

But if you want a trigger, just check its Is Trigger checkbox.

NOTE: This code turns on/off the collider of the object it’s attached to. If you want to disable the other object’s collider, use hit.collider.enabled instead.

You could try setting it to trigger, with this:

gameObject.collider.isTrigger = true; instead of moverparaheroi.colisao = 0;