How to make a hit test work

I can’t figure out how to define the object used for the if (hittest) command.
How do you do it?


swap the words in bold with the name of the two objects that you want the code to be for
btw, before entering the code (the one in the second line) you’ll need to indent
hope it works!