Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I prevent the player from dragging a Gui?

Asked by
Tesouro 407 Moderation Voter
10 years ago

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

Log in to vote
0
Answered by 10 years ago

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
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. adark 5487 — 10y
0
yeah, but the player has the mouse button down, he is dragging it. setting the property to false doesn't stop him Tesouro 407 — 10y
Ad

Answer this question