isrbxactive Synchronous
isgameactiveiswindowactive
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.
Luau
isrbxactive() -> booleanParameters
This function takes no arguments.
Returns
booleanA boolean representing the current focus state.
Example
Luau
print(isrbxactive() and "Host window focused" or "Host window not focused")