This member can only be accessed by CoreScripts. Attempting to access this member outside of a CoreScript will cause an error.
Used to override the enabled state of virtual reality when a user has a VR device available to use. If the user has a VR device available and this value is false when the game starts, VR mode will not be initialized.
This setting is only displayed in Roblox’s game menu if a VR device has ever been detected, and this is determined by the UserGameSettings’
The value of this property cannot be read by LocalScripts. You should refer to the VRService’s
VRService/VREnabled property instead.
This example prints “User is using a VR headset!” if the VREnabled property is true and “User is not using a VR headset!” is the VREnabled property is false.
local VRService = game:GetService("VRService") local isUsingVr =VRService.VREnabled if (isUsingVr) then print("User is using a VR headset!") else print("User is not using a VR headset!") end