Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I prevent the player from dragging a Gui?

I have a gui that is draggable, and it can't go away from some certain limits of position. If the player drags it off the limits, it returns to the original position, but then the dragging gets bugged, the mouse is offset and flickering. Is there a way to disconnect the player form dragging?

1 answer

There is a property to every Frame, TextLabel, TextBox, TextButton, etc. That can allow the player to disable or enable Dragging. For one you should have checked out the Wiki first, seeing as this isn't a request site.

If you want to make it so your object isn't Draggable, Un-Check the box that says 'Draggable'.

2 comments

2

You probably should have read the question fully, by the way. @OP; toggling the Draggable property, setting the position, and then toggling it back on should stop the flickering.

0

yeah, but the player has the mouse button down, he is dragging it. setting the property to false doesn't stop him

This discussion is preserved as it was. New answers, comments, and votes are closed.