How to make character look where the camera is looking?

How could I make the player’s character look at where the player’s camera is looking?

Like this:
gif4

Any help appreciated!

1 Like

I’m a little confused do you want one of the characters head to follow the other players character?

No, I’m asking how could I make the player’s head and upper torso look in the same direction the player is looking like in the gif.

You would need the client to tell the server what the torso angle should be, and then the server would replicate that to everybody else by setting the torso CFrame.

1 Like

How would I do that based on the player’s camera?

If this is a first person shooter game, all you need is the camera’s orientation. If it’s a third person game, well, the CFrame magic would come in, and I’m not good at that stuff…

I don’t know anything about controlling a player camera but you can start here

First person:

local cam = workspace.Camera
local torsoangle = Vector3.new(cam.CFrame.Rotation:ToOrientation())

Third person:

local cam = workspace.Camera
local torsoangle = -- good luck ;w;

I don’t understand why there’s a difference between first person and third person, either way, other player’s should be able to see the player’s character looking in the direction of the player’s camera.

Anyone have any idea how to do this?