Make Camera Position change with Head

My game is first person. I have a script that disables the default transparency of body parts except head, when going into first person, so that player can see his torso, legs and arms when looking down.

Everything works perfect, except when running and looking down, player can see the upper part of his torso moving back and forth, while the camera position doesnt change. I want the camera to follow the head. It would also make a very realistic camera wobble effect (the effect is not important for me, it will just be a side bonus).

I have tried doing

Workspace.CurrentCamera.CameraSubject = Head

And it worked, except when turning the camera players character wasnt turning with camera, like it does in default first person mode.

I have also tried

while task.wait() do
   Workspace.CurrentCamera.CFrame = Head.CFrame
end

But as predicted, this way I was unable to rotate the camera at all, because it was always changing its CFrame to heads CFrame.

How to make the camera follow the head in first person

2 Likes

Still looking for solutions on this

1 Like

im also looking for a solution, closest thing ive done was change the camera module “bodyparttofollow” variable as the character head, together with a head movement system which would make the camera follow the head’s position, but it doesnt work with cframe

Does anyone know how to do this, but with third person?

This topic is old, but I just happened to stumble upon it again.

Here’s the solution:
BodyPartToFollow_PlayerModule.rbxm (135.8 KB)
image
image
I modified Roblox’s BaseCamera module to have a prefered body part setting.

This works for third person too!

I hope this helps anyone.