The error i get is The current identity (2) cannot VRDeviceName (lacking permission 5)
this is confusing as i never have ran into it before can i get help?
My code is
local VRService = game:GetService("VRService") if (VRService.VREnabled) then -- game.ReplicatedStorage.IsVR:InvokeServer(VRService.VRDeviceName) print(VRService.VRDeviceName) else print("No VR device detected!") end
This will explain how you can create this. All you have to do is check which permission it requires to use VRService and use that identity to create it.
Simply, this has to be a plugin. Since it requires permission 5, and plugins have the highest permission possible, which is permission 5!
Hope this helped!
U simply cant.
What you actually need is UserInputService, you can find a code example for UserInputService.VREnabled here
Don't forget to mark my answer as the solution and up vote it if it solved your problem :)