I’m currently making a VR game but ran into a slight issue that I think may mess up gameplay. Whenever I press the thumbstick on my right controller (ButtonR3), my camera is toggled to Classic when it is originally in First Person, allowing me to see my character. I’ve tried using the following code, but it doesn’t do anything. Also, I use an Oculus Quest 2.
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
Player.CameraMode = Enum.CameraMode.LockFirstPerson
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.ButtonR3 then
wait(0.25)
if Player.CameraMode == Enum.CameraMode.Classic then
Player.CameraMode = Enum.CameraMode.LockFirstPerson
end
end
end)
Video: