How can I click on another object in script ?

Hi ! ^^

I want to change a value in my script when the mouse click on another object which not contains the script. How can I do this ?

I know the command OnMouseDown and public gameObject and I think it’s something like this ^^

Thanks for your answer ! ^^

I up my question ^^