How to detect a click from another object?

So i’ve got a script on my object that moves its position. How can i detect a click/touch from another object so it could enable the moving script? Thanks in advance.

I tried this:

function Start () {
if(Input.touchCount < 0){
GameObject.Find("something").GetComponent(blah).enabled = true;
else {
GameObject.Find("something").GetComponent(blah).enabled = false;

the thing is it didn’t detect the touch. So it didnt work.

If you provide some more code, we might be able to help a little better by showing what you’ve already attempted. But I can make a few suggestions. You could use events and trigger the object when something is clicked or you could find the game object and call a function when it detects a click.

EDIT ONCE PROVIDED MORE INFO: OK, you’re only testing for touches in the Start function. This generally only gets called once. If you want it to continuously be checking for touch events move your code into the Update function.