Basically, I'm trying to rotate a character torso to turn towards the face of another brick, making the player parallel to the part. What's the best way to do this?
How would I rotate a character torso to the face of a brick?
2 answers
When creating a CFrame using
CFrame.new(pos, lookAt)
it accepts two arguments. The first (pos) is a Vector3 position which is the location of the CFrame. The second (lookAt), is a Vector3 position which, if included, will be the position which the CFrame is facing. Thus, you can use:
lookAt = workspace.LookAtMe.Position
Torso.CFrame = CFrame.new(Torso.Position, lookAt)
The Front face of Torso will now be facing LookAtMe.
EDIT: To make the player parallel to the part, it depends on where the player is relative to the part.
If the "giant, long wall" has its Front face facing towards the player, then:
lookAt = Torso.Position - workspace.LookAtMe.CFrame.lookVector
Torso.CFrame = CFrame.new(Torso.Position, lookAt)
Alternatively, if other faces are facing the player, a different lookAt would be required:
lookAt = Torso.Position + workspace.LookAtMe.CFrame.lookVector --Back facing player
lookAt = Torso.Position - workspace.LookAtMe.CFrame.rightVector --Right side facing player
lookAt = Torso.Position + workspace.LookAtMe.CFrame.rightVector --Left side facing player
lookAt = Torso.Position - workspace.LookAtMe.CFrame.upVector --Top facing player
lookAt = Torso.Position + workspace.LookAtMe.CFrame.upVector --Bottom facing player
Using a BodyGyro might be the easiest way to accomplish what you are trying to do. You can read the wiki page here (The bottom example provides a good demonstration of how it is used): http://wiki.roblox.com/index.php?title=API:Class/BodyGyro
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
So, if I was trying to get the player to face a giant, long, wall, would it have the player face the center of the wall or face the wall relative to where I'm standing?
I'm trying to keep the character parallel to the object it's facing, no matter where it is.
This complicates things; in most cases either the part or the player will have to move in order to make the player both facing the part and be parallel to the part.
Or do you intend to only make the player parallel to the part?
I only intend to make the player parallel to the part.
I've updated the answer.
I would upvote this if I could. Thanks this helped me!