Skip to content

Edit ​

Types ​

Selection type ​

luau
type Selection = { any }

ClassSelector type ​

luau
type ClassSelector = <T>(className: T | keyof<Type.Editable>) -> (Type.EditProperties<Fallback<T>>) -> Selection

QuerySelector type ​

luau
type QuerySelector = (query: string) -> (Type.Map<any>) -> Selection

ParentSelector type ​

luau
type ParentSelector = () -> (Type.Map<any>) -> Selection

Properties ​

Defaults Read Only ​

luau
Edit.Defaults: { [string]: { [string]: unknown } }

Functions ​

edit ​

luau
Edit.edit(instance: Instance, properties: Type.Map<any>): Instance

new ​

luau
Edit.new(className: string, properties: any): Instance

split ​

luau
Edit.split(props: any, keys: any, ...: any): ...any

Splits a props table by key into fresh tables: one per keys group holding just the keys that group names, then a final table with everything else (instance properties, numeric children, __EVENT-style directives), ready to forward to a root instance. A group is an array of key names or a table whose keys are used; a key named by several groups goes to the first. Values move by reference and props itself is left untouched.

With one group, it is typed as a Pick of the props type and the rest as its Omit, keeping required members required. That needs the names as types: pass a schema table, or annotate a name array (local OWN: { "label" | "onClick" } = ...). An unannotated array only says { string }, and several groups are more than the solver can pick through, so those tables are Partial (every member optional).

luau
local OWN: { "label" | "onClick" } = { "label", "onClick" }
local own, rest = Flux.split(props, OWN) -- own.label: string, own.onClick: (() -> ())?

Open Documentation

Flags ​

defaults ​

luau
Edit.Flags.defaults: boolean

Process-wide on/off switch for the automatic per-class defaults: flipping it affects every later Flux.new from any script using this copy of Flux, so set it once at startup. When true (the default), every Roblox Instance built by Flux.new has its matching Flux.Defaults entries applied first. Set it to false to opt out globally and get raw, unstyled instances. One override stays either way: AutoButtonColor = false on TextButton and ImageButton, since it changes how a button behaves rather than how it looks (pass AutoButtonColor = true for the engine's behavior).

Open Documentation

Find ​

Ancestor Read Only ​

luau
Edit.Find.Ancestor: QuerySelector

Selects the first ancestor named name via Instance:FindFirstAncestor, then applies the property table to it. Use to reach an Instance above the hydrated element in the tree.

Open Documentation

AncestorClass Read Only ​

luau
Edit.Find.AncestorClass: ClassSelector

Selects the first ancestor of class className via Instance:FindFirstAncestorOfClass, then applies the property table to that matched Instance. Matches the exact ClassName.

Open Documentation

AncestorIsA Read Only ​

luau
Edit.Find.AncestorIsA: ClassSelector

Selects the first ancestor whose class is or inherits className via Instance:FindFirstAncestorWhichIsA, then applies the property table. Unlike AncestorClass, this honors the Instance inheritance chain.

Open Documentation

Child Read Only ​

luau
Edit.Find.Child: QuerySelector

Selects the first child named name via Instance:FindFirstChild, then applies the property table to it. The most common selector for reaching a named Instance one level down.

Open Documentation

ChildClass Read Only ​

luau
Edit.Find.ChildClass: ClassSelector

Selects the first child of class className via Instance:FindFirstChildOfClass, then applies the property table to that matched Instance. Matches the exact ClassName.

Open Documentation

ChildIsA Read Only ​

luau
Edit.Find.ChildIsA: ClassSelector

Selects the first child whose class is or inherits className via Instance:FindFirstChildWhichIsA, then applies the property table. Unlike ChildClass, this honors the Instance inheritance chain.

Open Documentation

Descendant Read Only ​

luau
Edit.Find.Descendant: QuerySelector

Selects the first descendant named name via a recursive Instance:FindFirstChild (FindFirstChild(name, true)), then applies the property table to it. Searches the entire subtree, not just direct children of the Instance.

Open Documentation

Parent Read Only ​

luau
Edit.Find.Parent: ParentSelector

Selects the hydrated element's Instance.Parent, then applies the property table to it. Use to reach one level up the tree without naming the parent. Takes no argument: Find.Parent() { ... }.

Open Documentation

Path Read Only ​

luau
Edit.Find.Path: QuerySelector

Walks a .-separated path from the hydrated element, one Instance:FindFirstChild step per segment, then applies the property table to the final Instance. A Parent or ^ segment climbs to Instance.Parent instead; empty segments are skipped. If any step misses, nothing is applied.

Open Documentation

Query Read Only ​

luau
Edit.Find.Query: QuerySelector

Selects every descendant matching a Roblox path query via Instance:QueryDescendants, applying the property table to each matched Instance. Fan out one property table across many elements at once.

Open Documentation

QueryFirst Read Only ​

luau
Edit.Find.QueryFirst: QuerySelector

Selects only the first descendant matching a Roblox path query via Instance:QueryDescendants, then applies the property table to that single Instance. The single-match counterpart to Query.

Open Documentation