One option would be to set the anchor of the parent to be relative to the green square. For example,parent:SetAnchor(TOPLEFT, greenSquare, TOPLEFT, 0,0)
Another option (if that doesn't work) would be to use the OnMoveStart and OnMoveStop of the green square, and put something like:
EVENT_MANAGER:RegisterForUpdate("moving", 10, moveParentToGreenSquare)
|