How would i make an NPC face a player?

So im working on a system where if you come within 15 studs (mangnitude) the NPC will face the player and have some dialog but i have no idea how to make the NPC face the player…

Please help! :smiley:

1 Like

See here:

Tween their CFrame to face the player on the client-side.

If they are not anchored, preferably use a BodyGyro or AlignOrientation to do the same trick.

4 Likes

Removed code due to random people changing it.

2 Likes

Yes, they’re moving to the center of the map because you are moving them to a CFrame with Vector3.new() as position part.

Carefully read my linked post above again. I have separated two cases: “Position + rotation” and “Rotation only”. You need position + rotation because you need position and rotation to be set.

4 Likes