Make object show/hide after i click another object.

Hi im totally new to unity and im having trouble with this.

Im having a gui text and im trying to make it active after i click on an object. im thinking of using:
function OnMouseDown()
{
“texty.active==true”
}
(texty is the gui text)
im putting this code in the object i wont to click but it wont accept it.
do i need to define texty like a public variable?
Any suggestions plz???..

When you put two equal signs, it’s a comparison, like “is equal to”
For what you are trying to do, you only need one.
texty.active = true;
and you don’t need quotations on it, since texty is presumably a game object. quotations only go around strings.