Edit
Types
Selection type
type Selection = { any }ClassSelector type
type ClassSelector = <T>(className: T | keyof<Type.Editable>) -> (Type.EditProperties<Fallback<T>>) -> SelectionQuerySelector type
type QuerySelector = (query: string) -> (Type.Map<any>) -> SelectionParentSelector type
type ParentSelector = () -> (Type.Map<any>) -> SelectionProperties
Defaults Read Only
Edit.Defaults: { [string]: { [string]: unknown } }Functions
edit
new
Edit.new(className: string, properties: any): Instancesplit
Edit.split(props: any, keys: any, ...: any): ...anySplits 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).
local OWN: { "label" | "onClick" } = { "label", "onClick" }
local own, rest = Flux.split(props, OWN) -- own.label: string, own.onClick: (() -> ())?Flags
defaults
Edit.Flags.defaults: booleanProcess-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).
Find
Ancestor Read Only
Edit.Find.Ancestor: QuerySelectorSelects 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.
AncestorClass Read Only
Edit.Find.AncestorClass: ClassSelectorSelects the first ancestor of class className via Instance:FindFirstAncestorOfClass, then applies the property table to that matched Instance. Matches the exact ClassName.
AncestorIsA Read Only
Edit.Find.AncestorIsA: ClassSelectorSelects 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.
Child Read Only
Edit.Find.Child: QuerySelectorSelects 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.
ChildClass Read Only
Edit.Find.ChildClass: ClassSelectorSelects the first child of class className via Instance:FindFirstChildOfClass, then applies the property table to that matched Instance. Matches the exact ClassName.
ChildIsA Read Only
Edit.Find.ChildIsA: ClassSelectorSelects 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.
Descendant Read Only
Edit.Find.Descendant: QuerySelectorSelects 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.
Parent Read Only
Edit.Find.Parent: ParentSelectorSelects 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() { ... }.
Path Read Only
Edit.Find.Path: QuerySelectorWalks 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.
Query Read Only
Edit.Find.Query: QuerySelectorSelects 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.
QueryFirst Read Only
Edit.Find.QueryFirst: QuerySelectorSelects 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.