Update 12-actions.md

This commit is contained in:
sindri 2026-03-02 13:29:17 +01:00 committed by GitHub
parent 6a55fc455a
commit d7c347f432
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ Creates an Action that makes a GuiObject draggable using input events (mouse and
```lua ```lua
draggable(opts: DraggableOptions?) -> Action draggable(opts: DraggableOptions?) -> Action
```
DraggableOptions DraggableOptions
• axis: "x" | "y" | "both" (default "both") • axis: "x" | "y" | "both" (default "both")
Constrains dragging to a single axis or allows free movement. Constrains dragging to a single axis or allows free movement.
@ -83,6 +83,8 @@ draggable() must be applied to an instance that:
If applied to a non-GuiObject, the Action should be treated as a no-op If applied to a non-GuiObject, the Action should be treated as a no-op
Example: Basic draggable panel Example: Basic draggable panel
```lua
local Players = game:GetService("Players") local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
@ -118,3 +120,4 @@ local function App()
end end
mount(App, playerGui) mount(App, playerGui)
```