I’m trying to make singleplayer 2D game. I know, this question is a bit strange, but can I somehow don’t kick player after 20 mins of idle or losing connection to internet? My game consist of 1 big local script, no any characters, parts in workspace and etc. Local script handle everything, and as I know, when player loses connection, local scripts are working, but server ones stopped from replicating to client.
So, does this possible, or not? And if yes, can I somehow notify player that he lost connection?
I guess what you could do, instead of getting when the player has been removed, you could count since the last input, and if it’s been 19 minutes you could send a remote to server and warn it ??
Ok, it is possible but I don’t know how lol. I know the game magic champions accomplished this because they have a AFK gems farm, every 5 mins you get 250 gems and you don’t have to click or anything to not get kicked
The problem is that roblox will kick player if it IDLE, or in other words - if player don’t made any input. So if I force player jump via script - this won’t be counted as player input, and also, my game haven’t any characters, so nobody can jump.
As many games do, you can:
Save player data, teleport him to a temp place, then teleport him back and load saved data.
you can disguise that thing as autosave
AFAIK, there’s no non hacky way of doing this. Once a player disconnects from your game there’s not much you could do. Can you explain why you’d need to do this? Why couldn’t a player just rejoin?
Just my observation (I have not done it), it appears this is handled in games currently by teleporting a player to a new place/game/server/etc to reset the timer.