1.Im trying to make a VR game
- 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)