Turning off 20-Minute Disconnect?

I was wondering if there was a way to script it so that a game would not kick you out after 20 minutes of inactivity. This is not for a normal game, this is for a clock/timer game mostly to test scripts

I’m assuming there’s not a way, but there are a lot of customizable things

1 Like

This is no possible, sadly :confused:

As far as I know, there’s no way to do that. The only way is to detect an input from the client, which of course only the player can do.

1 Like

Alright that’s what I thought. I wasn’t asking for code, I was asking if there was a function or something like that. Sorry if I phrased it weirdly.

1 Like

If you’re trying to test longer term code and absolutely have to have a player in game, I would suggest using an auto input script (not a Roblox script) on your client to prevent them from disconnecting. While usually this is against the rules in a lot of online games, if you’re just using it for testing I see no problems with it. To your original question, no, there is no way to increase the Roblox timeout length.

1 Like

You can try keeping track of the time since a client hasn’t sent any input, and teleporting the user out and back into the game using TeleportService when the timer reaches 19 minutes.


Sorry for the bump but I may have a solution.

This probably wont work but its worth a shot.
Maybe you could try use VirtualUser to create inputs on the client.

All of the functions that could simulate input cannot be put in scripts.

Just wanted to put this here for anyone else coming here in the future to save them some time, I don’t have the intention of doing this anymore.

I did not test this out but it might be possible-

Access the player character through a server script


Calculate the time since the player joined if it passes 19 minutes, move the character torso by a few studs or if the mouse is idle (there is a function for that).

The user will get kicked if no user input has been done in the last 20 minutes, as from the earlier replies it is not possible to prevent this. Character position will not prevent this either.

Sorry, didn’t check. For anyone who wants to try do this as well its best to just make the player rejoin every 15 minutes which resets the timer.

local ReqMins = 19

local Time = 0
game.Players.LocalPlayer:GetMouse().Move:Connect(function() Time = 0 end)
game:GetService("UserInputService").InputEnded:Connect(function() Time = 0 end)
ReqMins *= 60
while wait(1) do
	Time += 1;
	if Time >= ReqMins then
1 Like

This is good but why the TIme += 1 though? just make the while wait(60*19) do
The loop will wait for 19 minutes before its executed again and again…

but anyway once its teleported into another place… the script will not work anymore… so just implement wait… no need to do the loop…