Can you show me your entire script please? The current one that your using.
Sure.
local RunService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local uis = game:GetService("UserInputService")
local CAMERA_OFFSET = Vector3.new(-1, 11.85, 0)
camera.CameraType = Enum.CameraType.Scriptable
local function onRenderStep()
if player.Character then
local playerPosition = player.Character.HumanoidRootPart.Position
local cameraPosition = playerPosition + CAMERA_OFFSET
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.D then
camera.CFrame = Vector3.Angles()
elseif input.KeyCode == Enum.KeyCode.A then
camera.CFrame = Vector3.Angles(-1, 11.85, 0)
elseif input.KeyCode == Enum.KeyCode.A and input.KeyCode == Enum.KeyCode.W then
camera.CFrame = Vector3.Angles()
end
end)
camera.CoordinateFrame = CFrame.new(cameraPosition, playerPosition)
end
end
RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)
Ok, first of all the code after you create the function needs to be one space backwards. And the first keycode which is “D” you haven’t placed a value in Vector3.Angles(). You need to put numbers in it.