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
I feel like there’s a way, I’ve already made a system to hide the Roblox VR UI since it is very much in the way, but the player still needs an easy way to leave the game.
There’s no way to do this. Roblox already has a leave game button, you don’t need to make your own
I know, but the issue is Roblox’s current VR UI is very much in the way and it ruins the immersion. You can’t even fully hide it as a Roblox player either (you can kind of hide it but as soon as you look down in any way it re-appears). If you can’t tell I’m talking about the bar at the bottom.
Well, you have to understand this isn’t a choice, and the leave button or Kicking the player are the only ways.