Skip to content

Responsive ​

The screen and the player as shared nodes: viewport, UI scale, breakpoint, input device and accessibility settings. Available as Flux.Responsive. For safe areas (the topbar, notches, rounded corners), set the engine's ScreenGui.ScreenInsets (CoreUISafeInsets or DeviceSafeInsets) and ScreenGui.SafeAreaCompatibility instead.

luau
Flux.new "UIScale" { Scale = Flux.Responsive.scale }

Types ​

ScaleMode type ​

luau
type ScaleMode = "min" | "width" | "height" | "max"

Breakpoint type ​

luau
type Breakpoint = "phone" | "tablet" | "desktop"

Platform type ​

luau
type Platform = "console" | "mobile" | "pc" | "vr"

DisplaySize type ​

luau
type DisplaySize = "Small" | "Medium" | "Large"

Input type ​

luau
type Input = "keyboard" | "touch" | "gamepad"

TextSize type ​

luau
type TextSize = "Medium" | "Large" | "Larger" | "Largest"

Breakpoints type ​

luau
type Breakpoints = { phone: number, tablet: number }

Config type ​

luau
type Config = {
	reference: Vector2,
	mode: ScaleMode,
	min: number?,
	max: number?,
	breakpoints: Breakpoints,
}

PartialConfig type ​

luau
type PartialConfig = {
	reference: Vector2?,
	mode: ScaleMode?,
	min: number?,
	max: number?,
	breakpoints: Breakpoints?,
	viewport: Graph.Reactive<Vector2>?,
}

Properties ​

config Read Only ​

luau
Responsive.config: Config

Live defaults shared by every derived node; mutate once at startup.

Open Documentation

platform Read Only ​

luau
Responsive.platform: Graph.Node<Platform>

The device class: "vr", "console" (ten-foot interface), "pc" (keyboard and mouse), or "mobile". Live on the client, so plugging in a keyboard and mouse or putting on a headset changes it; "pc" elsewhere.

Open Documentation

viewport Read Only ​

luau
Responsive.viewport: Graph.Node<Vector2>

The active camera's ViewportSize as a node, live on the client.

Open Documentation

scale Read Only ​

luau
Responsive.scale: Graph.Node<number>

UIScale factor derived from viewport; 1.0 at config.reference.

Open Documentation

breakpoint Read Only ​

luau
Responsive.breakpoint: Graph.Node<Breakpoint>

Size class derived from viewport width.

Open Documentation

displaySize Read Only ​

luau
Responsive.displaySize: Graph.Node<DisplaySize>

How large the screen is physically (GuiService.ViewportDisplaySize): "Small" (phones, tablets, handhelds), "Medium" (laptops and monitors, the default) or "Large" (TVs). Live on the client; where the engine lacks the property, a ten-foot interface counts as "Large".

Open Documentation

input Read Only ​

luau
Responsive.input: Graph.Node<Input>

The input the player is using right now: "keyboard" (keyboard and mouse), "touch", or "gamepad". Follows UserInputService.PreferredInput live on the client, so picking up a controller switches it; elsewhere it holds the mode matching platform.

Open Documentation

textSize Read Only ​

luau
Responsive.textSize: Graph.Node<TextSize>

The player's preferred text size (GuiService.PreferredTextSize): "Medium" (default), "Large", "Larger", or "Largest". The engine already draws text larger to match, so use it to make room around text, never to multiply TextSize again.

Open Documentation

reducedMotion Read Only ​

luau
Responsive.reducedMotion: Graph.Node<boolean>

Whether the player asked for reduced motion (GuiService.ReducedMotionEnabled). When true, swap movement and scaling animations for instant changes or simple fades.

Open Documentation

preferredTransparency Read Only ​

luau
Responsive.preferredTransparency: Graph.Node<number>

The player's background transparency preference (GuiService.PreferredTransparency), from 0 (opaque backgrounds) to 1 (the default). Multiply translucent BackgroundTransparency values by it.

Open Documentation

Functions ​

scaleOf ​

luau
Responsive.scaleOf(partial: PartialConfig?): Graph.Node<number>

Factory escape hatch: a scale node with per-surface config (merged over defaults).

Open Documentation

breakpointOf ​

luau
Responsive.breakpointOf(partial: PartialConfig?): Graph.Node<Breakpoint>

Factory escape hatch: a breakpoint node with per-surface thresholds.

Open Documentation