Better Draggable ui for core gui
Views: 546Executions: 43

VerifiedBetter Draggable ui for core gui

  • Keyless
  • Mobile untested

Advertisement

About this script

Description
This script creates a movable window in Roblox’s CoreGui. It builds a simple UI with a header that can be dragged anywhere on the screen.

Features

  • Uses UserInputService for mouse and touch input mobile friendly.

  • Dragging works on both desktop (mouse) and mobile (touch) they wont be drag when you slide your finger pass over it on your phone screen.

  • The header frame acts as the drag handle; clicking anywhere on it starts dragging.

  • The window smoothly follows the cursor or finger until release.

  • Cleanup function returned by MakeDraggable can disconnect all input connections.

  • Better than Built-in robloc's dragable Sustem

  • This will not stuck when open Roblox Menu like UIDraggable object.

  • Muti Touch Detections

  • Unlike Setting ObjectNane.Draggble = true this script will remember your Inout no matter how fast you drag

Example usage (plain text)
To create your own draggable window:

  1. Create a main frame (the window).

  2. Create a smaller frame inside it as the drag handle (the header).

  3. Call MakeDraggable(mainFrame, dragHeader)

mainFrame is the target frame which tell dragHeader Which UI Object should be update thier position

dragHeader is for detect if it's being hold or moved by user and update the main frame

The function returns a cleanup function that you can store and call later to remove all event connections, if needed

The provided script already demonstrates a working window, you can copy it and run it as-is. To customize, modify the frame sizes, colors, or add child elements (buttons, labels) inside the main frame as you want.

You can also add clickable frame or reszieable edge with this script