isrbxactive Synchronous

  • isgameactive
  • iswindowactive

Check whether the Roblox host window currently has focus. It helps a script avoid sending local input while the user is in another app.

Syntax
Luau
isrbxactive() -> boolean

Parameters

This function takes no arguments.

Returns

boolean

true while the host window is active; false otherwise.

Usage notes

Focus is a snapshot, not a promise that the window will stay active.

Example

Example
Luau
if isrbxactive() then
    print("The host is ready for local input")
end
Kawaii documentation