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

[Unanswered] [EDIT] Making the Parent of a Draggable GUI drag when it's dragged?

Asked by
blowup999 659 Moderation Voter
7 years ago
Edited 7 years ago

tl;dr: When I move a child frame of a frame using Draggable I want to move the parent frame and all its components instead.

I have a ScreenGui, inside of it is a frame and inside of that frame is another frame.

When the child frame is dragged I want the parent frame to be dragged instead. The parent frame has other child objects that have to be dragged along with it which is why I need the parent frame to be dragged, but I only want the child frame to be draggable.

What I'm thinking for this is a Changed event on the child frame and if the position is moved it moves the parent frame instead, however I feel like ROBLOX should have an easier way to implement this. Does anyone know of a better way to do this?

****EDIT

https://gyazo.com/4bf4a74321c48eeb8e50347ee00ba142

The top right is the child and I want it so that if the top right or middle is dragged it doesn't move, but if the bottom left is dragged it does move

1 answer

Log in to vote
-1
Answered by 7 years ago

Gui objects have the property 'Active' and 'Draggable'. If a gui object has 'Active' or 'Draggable' disabled, it cannot be dragged on its own. So, to answer your question, all you would have to do is disable the 'Active' or 'Draggable' property of any gui object that you want to stay in its relative position inside the parent frame.

0
Tried it in my script and didn't work so I ran a test with a screen gui > frame > frame with frames having same size and it didn't work either blowup999 659 — 7y
Ad

Answer this question