When I press the mouse down again, the screen I want to drag resets to the position (0,0).

I want to make a child object draggable, so I wrote the following logic on the main screen. It works correctly, allowing the object to be dragged and stopping movement when I release the left mouse button. However, when I press the left mouse button again, the object resets to its original position. I suspect the issue might be with the event tick, but after trying various approaches, this is the closest I’ve gotten to success. I’m not sure what I should improve to fix this.

On Mouse Button Down

On Mouse Move

On Mouse Button Up