How to make the camera follow ONLY the orientation of the players head instead of the position?

Sup developers,

I’m making a game that match these two genres: Horror, Parkour. But i need to understand how can i make the camera follow ONLY the orientation of the players head? I don’t want the position, I only want the orientation, anyone knows how to do that?

Any help would be appreciated!

1 Like

Can you show the script, every scripting support post is needed a script to fix a problem.

But i think you can use CFrame.Angles shown here.

1 Like

Hey, i just want a example script, not a full one! Also, i think it’s not a super hard thing, i just don’t know how to make it follow ONLY the orientation, the both i know i only want the orientation

Wait i just figured out something,
here is an example script:

local Head = -- Your Characters Head
workspace.Camera.CFrame.Rotation = Head.CFrame.Rotation

I think that will help

If I’m understanding correctly, I believe something like this should work:

CurrentCamera.CFrame = CFrame.new(CurrentCamera.CFrame.Position) * CFrame.Angles(math.rad(Head.Orientation.X), math.rad(Head.Orientation.Y), math.rad(Head.Orientation.Z))

I think i already tried this way and it didn’t work, but i’m gonna still try to see

Gosh, all in one line, could you please format it for me?

Also it didn’t work and what is happening is… uhhh… i can’t even explain :skull: My character is just tweaking out like if he were crazy, like super crazy

I may be misunderstanding what you want. Can you try to explain further? Do you want the camera to stay in one place, or do you want it to follow the player? Are you trying to do something like HELLMET?

No, no, do you know that animations change the head orientation most of the time? Well, i want actually change the orientation to the player’s head orientation, but i never played hellmet or ever have watched any videos about it (just a little bit) but i don’t want it to stay on one place, i want it to rotate’s with the player’s head.

Try

local Head = character.Head

game:GetService("RunSerive").RenderStepped:Connect(function()
local X,Y,Z = Head.CFrame:ToOrientation()

local CameraPosition = Vector3.new(0,0,0) -- change to whatever you want the camera position to be
Camera.CFrame = CFrame.new(CameraPosition) * CFrame.Angles(X,Y,Z)
end)

That’s essentially what I suggested and he said it was wrong, so I don’t know :person_shrugging:

??? i didn’t said that bro i just said the script didn’t worked, my character was just tweaking

Are you trying to make an animated camera?

1 Like

No, Gosh i think it’s way too hard to explain what i want lol

Could you show us a few examples of what you want to achieve?

1 Like

I meant this,

The camera’s orientation goes with the animation

YES!! Exactly that! i want exactly that, but i may need some fake cameras for this or smth?

Change the CameraPosition to be Head.Position in the snippet provided by @Korpsii.

Wow, now i can’t rotate my camera, only jumping