I have made this Point of view Script but it is when you Press V it goes to first person or third.
Cant seem to get it to work maybe its where I have it or something in the code. If anyone can help me much will be appreciated.
Local player = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
local humanoid = player.Character:WaitForChild(“Humanoid”)
local currentCameraType = Enum.CameraType.Custom
– Set up the camera to be in third person mode initially
camera.CameraType = Enum.CameraType.Custom
camera.CFrame = humanoid.RootPart.CFrame + Vector3.new(0, 3, -8)
camera.CameraSubject = humanoid
– Switches the camera view between first person and third person modes
local function switchCameraView()
if currentCameraType == Enum.CameraType.Custom then
currentCameraType = Enum.CameraType.Scriptable
camera.CameraType = currentCameraType
humanoid.CameraOffset = Vector3.new(0, 0, 0)
else
currentCameraType = Enum.CameraType.Custom
camera.CameraType = currentCameraType
camera.CameraSubject = humanoid
camera.CFrame = humanoid.RootPart.CFrame + Vector3.new(0, 3, -8)
end
end
– Listens for the V key to be pressed
game:GetService(“UserInputService”).InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.V then
switchCameraView()
end
end)