How to prevent players from leaving the game?

I am working on a project, but in order for it to function, I need to make it so if my account tries to leave, it prevents it. This is exclusively for the group of people I add (with permission).

It’s going to be on display, so someone could easily exit the game and make us have to rejoin and re-enter the password (which wouldn’t be ideal). So there are no malicious intents; just want to protect it since it is on display.

How could I go about doing this, and if it’s not possible, should I add a system to notify the other accounts active if it disconnects?

1 Like

I don’t think you can stop people from disconnecting. You can figure out that they left, though. This doesn’t help though if for your purposes going AFK is as bad as disconnecting

1 Like

No, people will be using it, but I don’t want them to easily be able to leave and make me have to fix it. I will try the ‘figure out that they left’ part. Thank you!

1 Like

Pretty sure this is very impossible.

Kinda late, not sure, but maybe, if you create some kind of value inside player and make a script that checks when player left and sets that value to false and then u check if its true, idk. This may help (Sorry for bumping)