technically its working, but it’s janky and it is following every movement of the head, i don’t want that, only to up and down movement (sorry i forgot to specify)
CameraSubject can work but it give other problems because we change it into a part instead of the humanoid and because i want to do other things based on the position
local runService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local player = game:GetService("Players").LocalPlayer
local character = player.Character
runService.RenderStepped:Connect(function()
local head = character.Head
local x,y,z = head.CFrame:ToOrientation()
camera.CFrame *= CFrame.Angles(0,0,z)
end)
local player = game.Players.LocalPlayer
local camera = game.Workspace.Camera
local character = player.Character or player.CharacterAdded:Wait()
local head : Part = character:WaitForChild("Head")
local RunService = game:GetService("RunService")
RunService.RenderStepped:Connect(function(delta)
local HeadCFrame = CFrame.lookAt(camera.CFrame.p, head.Position + head.CFrame.LookVector)
camera.CFrame = camera.CFrame:Lerp(HeadCFrame, .5)
task.wait()
end)