ReferenceInput

iswindowactive

Reports whether the current game window has input focus.

Syntax

iswindowactive() -> boolean

Also available as

isgameactiveisrbxactiveis_game_activeis_rbx_activeis_window_active

Returns

TypeDescription
booleanWhether the game window is active.

Description

This is a snapshot of window focus, not a check that a character is alive or a game has finished loading. Use it to avoid queuing input while the user is interacting with another window.

Example

if iswindowactive() then
    print("Game has focus")
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.