How to Access another gameObject and enable/disable it?

Hello,

How would I disable a game object through code? Attached is a image of the gameObject I would like to disable.

Right now Im enabling / disabling the code on that gameobject because Im not sure how to enable / disable the gameobject itself?

function ThreeWay()
{
	//gotta be a better way to acces the gameObject instead of the script???
	threeWayShooting.shootingThese = true;		
}

468986--16446--$Picture 6.png

http://unity3d.com/support/documentation/ScriptReference/GameObject-active.html

Thanks celinscak :smile: I knew there was a way, but just coulnt find it :wink:

gameObject.active = false;// Deactivates the game object.

:smile: :smile: :smile: