Gui Item Selection

Heyo! I am making a plugin that is like Figma, an online project management tool. I am making the system where you can have draggable text boxes and connect them with lines. I have a line drawing system and a frame dragging system, but my problem is selecting the widgets to draw the line between. I wrote a small, private module for drawing and updating the line position and it takes 2 Gui Instances for input. What I need help making is a system where when you click a button (node, inside every widget), it waits for you to click another node. Once both are selected, draw the line then restart, waiting for a button press again.