Answered by
7 years ago Edited 7 years ago
When creating a CFrame using
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:
1 | lookAt = workspace.LookAtMe.Position |
2 | 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:
1 | lookAt = Torso.Position - workspace.LookAtMe.CFrame.lookVector |
2 | Torso.CFrame = CFrame.new(Torso.Position, lookAt) |
Alternatively, if other faces are facing the player, a different lookAt would be required:
1 | lookAt = Torso.Position + workspace.LookAtMe.CFrame.lookVector |
2 | lookAt = Torso.Position - workspace.LookAtMe.CFrame.rightVector |
3 | lookAt = Torso.Position + workspace.LookAtMe.CFrame.rightVector |
4 | lookAt = Torso.Position - workspace.LookAtMe.CFrame.upVector |
5 | lookAt = Torso.Position + workspace.LookAtMe.CFrame.upVector |