You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
As the title said, I want to make the NPC turn to the direction hat that the player character is facing at
What is the issue? Include screenshots / videos if possible!
The issue is I don’t know how to make it.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I am looking for solution in Devforum
local npc = script.Parent
local function TurnToPlayer(player)
local character = player.Character
local primary = character.PrimaryPart
local piv = npc:GetPivot().Position
local designated = Vector3.new(primary.Position.X, piv.Y, primary.Position.Z)
npc:PivotTo(CFrame.new(npc:GetPivot, designated))
end
to make the NPC smoothly look at the player, implement roblox’s TweenService!
if you need anymore help feel free to reply to this post