VR move script isn't working

1.Im trying to make a VR game

  1. My script isn’t working for the move
local UserInputService = game:GetService("UserInputService")
local LInput = Vector2.new(0,0)
local RInput = Vector2.new(0,0)
local function OnInputChanged(Input, GameProcessedEvent)
	if Input.KeyCode == Enum.KeyCode.Thumbstick1 then
		LInput = Input
	elseif Input.KeyCode == Enum.KeyCode.Thumbstick2 then
		RInput = Input
	end

end

UserInputService.InputChanged:Connect(OnInputChanged)

local function Move()
	workspace.CurrentCamera.CFrame *= CFrame.new(LInput.X,0,LInput.Y)
end

game:GetService("RunService").RenderStepped:Connect(Move)

Input Changed returns andInput Object, not the position of the thumbstick. and it uses Vector3 not Vector2.

local LInput = Vector2.new(0,0,0)
local RInput = Vector2.new(0,0,0)
local function OnInputChanged(Input, GameProcessedEvent)
	if Input.KeyCode == Enum.KeyCode.Thumbstick1 then
		LInput = Input.Position
	elseif Input.KeyCode == Enum.KeyCode.Thumbstick2 then
		RInput = Input.Position
	end

end
1 Like

Thank you @GregTame!
really helped a lot : )