Player camera issues

Hello, can someone give me a hand? I need to make the first person camera show the player’s torso and hands (adapt the camera so that it looks good) and the head and torso follow the camera…

like this video:

Any idea how I can get it? :frowning:

localscript (StarterPlayerScripts):

local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer

function onInputBegan(input, gp)
	-- change to first person camera
	print('before changing')
	if input.KeyCode == Enum.KeyCode.E then
		-- rest of code
		print('camera changed')
		Player.CameraMode = Enum.CameraMode.LockFirstPerson
	end
end

UIS.InputBegan:Connect(onInputBegan)

Try this

1 Like

I just did it but I don’t know how to position the camera on the camera by pressing the E and only see the torso and hands for the local player

local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

local camera = game.Workspace.CurrentCamera
local head = character:WaitForChild('Head')

local fp_Max_Distance = 0.6
local fp_Transparency = 0
local tp_Transparency = 0

function setCharTransparency(transparency)
	for i,v in pairs(character:GetChildren()) do
		if v:IsA('BasePart') then
			v.LocalTransparencyModifier = transparency
		end
	end
end

function onInputBegan(input, gp)
	-- change to first person camera
	print('before changing')
	if input.KeyCode == Enum.KeyCode.E then
		print('E has been pressed')
		RunService.RenderStepped:Connect(function()
			local is_First_Person = (head.CFrame.Position - camera.CFrame.Position).Magnitude < fp_Max_Distance
			
			if (is_First_Person) then
				setCharTransparency(fp_Transparency)
			else
				setCharTransparency(tp_Transparency)
			end
		end)
	end
end

UIS.InputBegan:Connect(onInputBegan)