Is there a way to get around the afk kick?

So, I want to have a script that will like kick the player after 19 minutes (20 minutes is the roblox afk kick) and then rejoin the player.

I have tried doing this, but when the player rejoins, it says that the server has been shut down. So, any ideas of how to do this?

1 Like

Search it up first of all.

Summary:
Rejoin the player by teleporting the player to the same game every 19 min.

I don’t know if there is any way to make a script that prevents the 20 AFK kick. But one way it can be done with external software is, you can use a keyboard macro, or autoclicker to make roblox think that the player isn’t AFK, and then the player won’t get kicked for being AFK.

2 Likes

Instead of trying to teleport the player back into the same server, use :ReserveServer() and simply create a new server for the player to teleport into. The old one will close, and the player will be unaffected if AFK.

This is different from just teleporting the player back into the game, since you don’t want them joining the starter place and sticking around. You need to specifically reserve a server in the AFK place.

2 Likes

Are you testing this as just yourself? Because when you rejoin, the old server gets shut down immediately when the last player leaves. Thus, if you are the only one playing the game, it will lead to a shutdown message. If you have other player’s in the game, then it should successfully reconnect them.

1 Like

I created a solution for this a while ago. It teleports a player to a reserved server if they are the only one in the server. Once in the reserved server, it teleports them back to a public server. Even if no public servers are open, it will create one and place them in it.

this is the only good answer here

1 Like