Bug in Native Code?

Hello!

Today i thought i’d start trying out VR Stuff on roblox.
Welp, i haven’t even been able to do anything, seeing when i try to detect if im in vr or not on a blank baseplate, i get a core script error!? :frowning:

Here’s the error:

  20:16:47.727  Players.DevDucc.PlayerScripts.PlayerModule.CameraModule.VRBaseCamera:97: attempt to index nil with 'Connect'  -  Studio
  20:16:47.727  Stack Begin  -  Studio
  20:16:47.727  Script 'Players.DevDucc.PlayerScripts.PlayerModule.CameraModule.VRBaseCamera', Line 97 - function OnEnabledChanged  -  Studio
  20:16:47.727  Script 'Players.DevDucc.PlayerScripts.PlayerModule.CameraModule.BaseCamera', Line 602 - function Enable  -  Studio
  20:16:47.727  Script 'Players.DevDucc.PlayerScripts.PlayerModule.CameraModule', Line 362 - function ActivateCameraController  -  Studio
  20:16:47.727  Script 'Players.DevDucc.PlayerScripts.PlayerModule.CameraModule', Line 396 - function OnCameraSubjectChanged  -  Studio
  20:16:47.727  Script 'Players.DevDucc.PlayerScripts.PlayerModule.CameraModule', Line 424  -  Studio
  20:16:47.727  Stack End  -  Studio

and here’s the only script i have: (which i got from here)

local userInputService = game:GetService("UserInputService")

local isUsingVR = userInputService.VREnabled
if isUsingVR then
	print("User is using a VR headset!")
else
	print("User is not using a VR headset!")
end

Does anyone know why this could be happening? really upset i haven’t even been able to start…
Any help is greatly appreciated! Thanks!

(here’s the place file if it helps)
TestVrMechanics.rbxl (52.3 KB)

This looks like an error with Roblox code, so you can either patch it yourself or wait for a fix. I’d suggest posting this somewhere in #bug-reports:engine-bugs though