Find Closest

How would I go about finding the closest instance to a certain spot? I was thinking about using the distance formula and looping through all the instances on the stage, but I don’t know how to find the shortest distance between all those measured. Could someone help me out please? :smiley: