Is that possible to NOT kick player when he lose connection to internet or 20 minutes idle?

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?

1 Like

Pretty sure the game pauses and notifies when disconnected, but you can just use PlayerRemoving to detect that I guess.

Pretty sure it is possible, if you can find a way to automatically click the players screen after a certain amount of time.

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 ??

This is a bit off-topic, but having your game entirely on the client means your entire game can be stolen…

7 Likes

VirtualInputManager and VirtualInputManager:SendKeyEvent or SendMouseButtonEvent probably will help you
or just use

local vu = game:GetService("VirtualUser")
game:GetService("Players").LocalPlayer.Idled:Connect(function()
   vu:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
   task.wait(1)
   vu:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
end)
2 Likes

i am sorry but All of the functions that could simulate input cannot be put in scripts.
image
but you can now if player idled by using Player.Idled
and roblox made that to make less servers work so as a dev i think it’s hard to do something :frowning:

this service’s API can only be used by CoreScript :frowning:

I’ll add saving system and ranking on server script, so not everything can be stolen. But… YOU ARE RIGHT, and this’s bad. :frowning:

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

If you include non-idling and non-AFKing time too, there is other way to do this.

You can make a script that will make the person jump after 19 minuets had passes

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

2 Likes

Should ask to staff about it.
From user with broken key.

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.

No, its not possible. Its been discussed many times before.

Explanation for Preventing Kick on Connection Loss:

When a player loses connection, they’ll have to get kicked from the server since the player is no longer connected to the server itself.

Explanation for Preventing Idle Kick:

There is no way to modify the idle kick time with without modifying the CoreGui, which only Roblox Staff Members have access to.

People have tried many methods, and AFAIK none of them have worked.

The player can set up an autoclicker to reset the idle time, but you can’t make a script to remove it completely.

2 Likes

Yes it is possible, as many games have achieved this (well a few, one being the example I gave before)

Yes, there is … however I’m not to sure Roblox would like you doing that.
It would require spoofing the logoff counter. By moving the player.

I’d just forget about this one.

Nothing like getting the player a ban for spoofing when it was the program doing it. :nauseated_face:
If you don’t program with integrity you’re just a hacker.

1 Like