Getting Started
To get started using the Draggable module, follow these simple steps:
We first need to require the module:
local Draggable = require(--[[ Path ]]) -- Example game.ReplciatedStorage.Draggable
Create a Draggable Class for your GuiObject:
local myFrame = script.Parent.Frame
local draggableObject = Draggable.new(myFrame)importantMake sure that the GuiObject's Interactable is set to
true
.The Draggable module does not work with any GuiButton.
tipIf the Draggable's GuiObject is being obstructed by a GuiObject
Now your GuiObject is draggable! Once you have decided to stop the dragging capability, simply call the Destroy
method on the class.