Interact
Interaction state as read-only boolean nodes (hover, press, selected, focused) and the hit tests pointIn, sunk and covered. Available as Flux.Interact.
local hovered = Flux.Interact.hover(button)Types
HoverOptions type
type HoverOptions = {
-- Only guis outside the object cover it: a row, a card or a scrolling area stays hovered over its own buttons.
within: boolean?,
}Functions
pointIn
Interact.pointIn(x: number, y: number, object: GuiObject): booleanWhether the point (x, y) lies within object's absolute bounds (inclusive, ignoring rotation). Coordinates are inset-relative, matching InputObject.Position and AbsolutePosition.
sunk
Interact.sunk(x: number, y: number, object: GuiObject, token: any?): booleanReturns true when input at (x, y) would be claimed by an Active or input-sinking GUI rendered above object (or while the Roblox escape menu is open). Pass the InputObject as token to share the hit-test query across multiple controls on the same input event.
covered
Interact.covered(x: number, y: number, object: GuiObject, token: any?): booleanReturns true when input at (x, y) would be claimed by an Active or input-sinking GUI above object that is not a descendant of object.
hover
Interact.hover(object: GuiObject, options: HoverOptions?): Graph.Node<boolean>Returns a read-only boolean node that is true while a pointer or touch contact is inside object with no input-claiming GUI above it. Pass { within = true } on containers so child controls inside object do not count as covering it.
press
Interact.press(object: GuiObject): Graph.Node<boolean>Returns a read-only boolean node that is true while object is held down by pointer, touch, or gamepad/keyboard activation (ButtonA/Enter). Stays true until that input ends anywhere on screen.
selected
Interact.selected(object: GuiObject): Graph.Node<boolean>Returns a read-only boolean node tracking whether object is currently GuiService.SelectedObject.
focused
Interact.focused(textBox: TextBox): Graph.Node<boolean>Returns a read-only boolean node tracking whether textBox currently has keyboard focus.