From ef4c336650e32551f4c0fe08c6a5cecef39c9c2f Mon Sep 17 00:00:00 2001 From: sindri <33976067+isarsindri@users.noreply.github.com> Date: Tue, 3 Mar 2026 13:33:06 +0100 Subject: [PATCH] Enhance draggable function documentation with options Added detailed options for the draggable function, including axis constraints, smoothing, and drag event callbacks. --- docs/tut/crash-course/12-actions.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/tut/crash-course/12-actions.md b/docs/tut/crash-course/12-actions.md index f22c13c..643b00c 100644 --- a/docs/tut/crash-course/12-actions.md +++ b/docs/tut/crash-course/12-actions.md @@ -64,15 +64,25 @@ Creates an Action that makes a GuiObject draggable using input events (mouse and draggable(opts: DraggableOptions?) -> Action ``` DraggableOptions + • axis: "x" | "y" | "both" (default "both") + Constrains dragging to a single axis or allows free movement. + • smoothTime: number (optional, default 0) + Enables smoothing/“weight” while dragging. 0 disables smoothing. Practical range: 0.05–0.12. + • onDragStart: (startPos: UDim2) -> () (optional) + Called when dragging begins. Receives the starting Position. + • onDrag: (newPos: UDim2) -> () (optional) + Called while dragging. Receives the updated Position. + • onDragEnd: (endPos: UDim2) -> () (optional) + Called when dragging ends. Receives the final Position.