how to make object do something when touched?

im making my game and i need to make elevator,i had make the elevator ,but i wanna make he do something just when i touch it

Probably what you need is a Trigger that activate when something get into it.

// to use this function you need to be a Collider component with "trigger" property enabled
function OnTriggerEnter (other : Collider) {
    ....
}

Take a look on these documentations and its references: