Rotate head of a character

I have a custom character:

However, I want the head to turn towards a specific player, or a specific part for the sake of this post. An example is shown here:

image

Obviously, this character will be moving, so typical methods of changing the cframe angles might not work. Any other suggestions?
(i couldn’t find solutions in other posts)

Easy first make a script that uses local head or something like that then do head.CFrame = CFrame.new(head.Position, target.Position) and that should work :smiley:

2 Likes

Would that work on a moving character?

You can do that, just one thing is that instead of putting in the position as the head position, you could do something like this:
head.CFrame = CFrame.LookAt(body.Position + Vector3.new(Adjust the offset here), target.CFrame)
But I’d recommend to experiment with Motor6Ds as instead of having to update the position of the head really fast to make it not oddly lag behind the body which may be demanding, the Motor6D will automatically constrain the position of Part1 relative to Part0 and you can easily add your own offset both rotationally and positionally if needed.

it should also mine works you don’t need .lookat to use look at

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.