Is there a way to disconnect a player from the game without kicking them?

I’m trying to make a custom system to leave my VR game, similar to how you would by opening the pause menu and clicking the Leave button. I don’t want to kick them from the experience because I feel like that’d be kind of weird, I’ve tried the player:Destroy() method but that pops up an error saying “Player has been removed from the DataModel” which is even worse in my opinion lol. Anyone know how I could achieve this?

8 Likes

Pretty sure only Roblox Core scripts have this kind of functionality, so no, this isn’t possible. Have to make do with :Kick().

4 Likes

I feel like there’s some way to do this as in VR (My game is only accessable in VR.), the UI is all parented to the camera, maybe there could be a way to false trigger the player pressing the Leave button on the VR UI?

3 Likes

The function the leave button uses is a core-only game:Shutdown(). No, you cannot make the user leave without either having the pop up show OR exploiting a crash (the kind that silently closes Roblox)

1 Like

I just want it to put them on the main menu of Roblox, I wasn’t really talking about running the same functions as the button, I was thinking more tricking Roblox into thinking the Local player clicked the leave button, so a CoreScript runs game:Shutdown() (Like I said, in VR, the Gui is placed in the Camera instead of CoreGui, making it accessible by LocalScripts.

Well, not quite possible.

Crash them with a while true do :troll:

I don’t want to close their game, I want to bring them back to the main menu of Roblox.

Yeah youll just have to Kick them