How do I make a frame stop moving when touching another frame?

  1. What do I want to achieve? I want to make it so that when a frame touches another frame, it stops moving. But when it moves away, it can move.

  2. What is the issue? I don’t understand how to make this work. I am not that good with Coding Math.

  3. What solutions have I tried so far? I have tried using the AbsolutePosition of the X and Y axis, but I still couldn’t wrap my head around what I was doing.