How to make player face certain direction?

Title says it all.
Which function is used or whatever?

CFrame.lookAt.

It takes two inputs: the initial position (eye) and the target position,

workspace.iiNivk.HumanoidRootPart.CFrame = CFrame.lookAt(workspace.iiNivk.HumanoidRootPart.Position, workspace.SpawnLocation.Position)

2 Likes

Thanks, I had never heard of that function. :slight_smile:

1 Like

You would use CFrame.lookAt, with two arugments CFrame.lookAt(CurrentPosition,PositionToLookAt)
Example Usage:

local HRP = game.Players.LocalPlayer.Character.HumanoidRootPart
HRP.CFrame = CFrame.lookAt(HRP.CFrame.Position, workspace.Part.CFrame.Position)
1 Like

Oh hi, you are chasing me around lol?
Anyways if possible I also need help for smth else
This topic here

1 Like

Not really lol, i like to help around here.

1 Like

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