I want to make my character face the same way as my camera, but I don't know how to tell which direction my camera is facing.
✓ ANSWER ACCEPTED
How do I make my character face the same way as my camera?
2 answers
✓ Accepted answer
Camera.CFrame.LookVector will return the normalized vector of where the camera is facing. With this information you could set the PrimaryPart's CFrame towards that vector.
local PrimaryPos = Character.PrimaryPart.Position
local LookAt = Camera.CFrame.LookVector
Character.PrimaryPart.CFrame = CFrame.new(PrimaryPos, PrimaryPos + Vector3.new(LookAt.X, PrimaryPos.Y, LookAt.Z))
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
char.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.Position, workspace.CurrentCamera.Position)
This discussion is preserved as it was. New answers, comments, and votes are closed.
