How to find the closest position to a part

Did @NeptuniaI solve it? Can you mark it as solution. It may help me.