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?
Pretty sure only Roblox Core scripts have this kind of functionality, so no, this isn’t possible. Have to make do with :Kick()
.
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?
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)
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 LocalScript
s.
Well, not quite possible.
Crash them with a while true do
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