turn "is trigger" button off?

how would you turn off the is trigger button when i collide with something. the following script doesn't work. could someone help me?

script:

var mushroom : Transform;

function OnTriggerEnter (hit : Collider)

{

if(hit.gameObject.tag == "Floor")

{

mushroom.isTrigger.enabled = false;

}

because it says is

}

take out the .enabled part, and it should work fine.

mushroom is a Transform, does not contain 'isTrigger'

I think you need to call GetComponent:

mushroom.GetComponent(MeshCollider).isTrigger = false;

or

hit.isTrigger = false;

if you'd rather disable that.