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

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

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

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.

1 comment

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

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