Skip to content

Interact

Types

Group type

luau
type Group = {
	activate: (self: Group, state: Graph.Node<boolean>) -> (),
	deactivate: (self: Group, state: Graph.Node<boolean>) -> (),
	toggle: (self: Group, state: Graph.Node<boolean>) -> (),
	clear: (self: Group) -> (),
	_active: Graph.Node<boolean>?,
}

Functions

exclusive

luau
Interact.exclusive(): Group

Creates an exclusive group: at most one boolean node is active per group, so activating a member deactivates the previous one. One group per concern (open menus, hovered controls, modal dialogs) replaces the "close everything else first" bookkeeping those UIs otherwise need.

Open Documentation

pointIn

luau
Interact.pointIn(x: number, y: number, object: GuiObject): boolean

Whether the point (x, y) lies within object's absolute bounds (inclusive, ignoring rotation). Coordinates are inset-relative, matching InputObject.Position and AbsolutePosition.

Open Documentation

sunk

luau
Interact.sunk(x: number, y: number, object: GuiObject): boolean

Whether input at (x, y) would be claimed by an Active gui (or GuiButton) rendered above object, e.g. dropping a hover state while a floating menu covers the control. Outside a BasePlayerGui (a plugin dock, a SurfaceGui in workspace) nothing can claim the point, so this yields false.

Open Documentation