This small library is useful for handling players who are crashing / timing out.
Player:IsTimingOut() - (Bool) Check if a player is marked as timing out
Player:GetTimeSinceLastReceived() - (Float) Get the time since the last recieved packet in seconds
INET_TIMEOUT_SECONDS - Global variable with the default timeout time in seconds (180)
- This example kicks players who are timing out after 10 seconds
timer.Create(“Timeout”, 1, 0, function()
for k,v in pairs(player.GetAll()) do
if(v:IsTimingOut() and v:GetTimeSinceLastReceived() > 10) then