isrbxactive Synchronous

  • isgameactive
  • iswindowactive

Report whether the host window currently has focus. Use it to decide whether a foreground-only UI action should run. This reports window focus, not whether a script or network request has finished.

Syntax
Luau
isrbxactive() -> boolean

Parameters

This function takes no arguments.

Returns

boolean

A boolean representing the current focus state.

Example

Example
Luau
print(isrbxactive() and "Host window focused" or "Host window not focused")
Kawaii documentation