Can you force-open the VR gui?

I’m trying to add VR support to some existing games, but the thing with VR is that you can hide the entire PlayerGui at any time by clicking on the collapse button in the bottom bar.

image

This is a big problem when I want to display a notification to the user, open some menu, etc. They won’t see anything if they have their UI collapsed!

Is there any way I can force the UI to open? I thought this was possible, but no matter what I try I can’t seem to do it.

I don’t believe there’s a way to bypass that functionality. However, you can utilize individual 3D parts, each with a SurfaceGui, and weld them to the player’s screen to serve as alternative 3D ScreenGui.

It seems to be possible. Roblox High School 2 was able to do it.

local vrpanel = game.Workspace.Camera:WaitForChild("VRCorePanelParts")
if vrpanel then
	vrpanel:WaitForChild("BottomBar_Part").Visible = true
end

Would this work?

While there might be some custom solutions out there, after conducting research, I couldn’t find any official documented solution for this issue. It’s likely that Roblox intentionally restricts bypassing this feature.

Very ugly hack, but this seems to work.

I figured it had something to do with gamepads, and sure enough, GuiService:Select() forces the UI to open.

local guiService = game:GetService("GuiService")
local openVrGui = Instance.new("BindableEvent")
local plrGui = game:GetService("Players").LocalPlayer.PlayerGui

openVrGui.Event:Connect(function()
	local screenGui = Instance.new("ScreenGui")
	local button = Instance.new("TextButton")
	
	button.BackgroundTransparency = 1
	button.Text = ""
	button.Size = UDim2.new(0, 1, 0, 1)
	button.SelectionOrder = -999999
	button.Parent = screenGui
	screenGui.Parent = plrGui
	
	guiService:Select(plrGui)
	task.defer(screenGui.Destroy, screenGui)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.