PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Idled

The Idled is a Player event that is usually fired two minutes after the game engine classifies the player as idle. Time is the amount of seconds since this point.

This can be used to track when a player has been idled for approximately two minutes - which can be useful for implementing away from keyboard (AFK) features into a game.

Notes

  • When the game engine classifies a player as idle, this event is called after two minutes. After every check, if the player is still idled, the event will continue to fire until the check reveals the player is no longer idle.

  • This event is used by Roblox to automatically disconnect players that have been idle for at least 20 minutes. If you would like to track when this disconnect occurs, considering using Players/PlayerRemoving alongside this event.

Parameters

Name Type Default Description

The time in seconds the player has been idle.


Code Samples


Player.Idled1

This example will print how long a player, named Player, has been idle for.

game.Players.Player.Idled:Connect(function(time)
     print("Player has been idle for " .. time .. " seconds")
end)