Question about dragging

Is there a way I can limit how far the actor can be dragged?
Meaning, like if you start to drag the actor, okay? I want it to not be able to be dragged off-screen.
Meaning, like if you start to drag the actor, okay? I want it to not be able to be dragged off-screen.