PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

VRDeviceName

VRService

string


Code Samples


VRService.VRDeviceName

This example checks if Roblox detects a VR device. If a VR device is detected, this prints the name of the device. If not, this example prints “No VR device detected!”.

local VRService = game:GetService("VRService")

if (VRService.VREnabled) then
	print(VRService.VRDeviceName)
else
	print("No VR device detected!")
end