PcoWSkbVqDnWTu_dm2ix
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