hello. I want to make the camera focus on the NPC's head. How to make this
✓ ANSWER ACCEPTED
How to focus camera at npc head?
1 answer
✓ Accepted answer
in a local script :
local CF = workspace.Camera.CFrame
workspace.Camera.CameraSubject = workspace.NPC.Head
workspace.Camera.CFrame = workspace.NPC.Head.CFrame + workspace.NPC.Head.CFrame.LookVector * 2
workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
workspace.Camera.CameraType = "Scriptable"
wait(5) --Time until the camera focus the player
workspace.Camera.CameraType = "Custom"
local player = game.Players.LocalPlayer
workspace.Camera.CameraSubject = workspace[player.Name].Humanoid
workspace.Camera.CFrame = CF --place the camera in its old position
to copy and paste:
local CF = workspace.Camera.CFrame
workspace.Camera.CameraSubject = workspace.NPC.Head
workspace.Camera.CFrame = workspace.NPC.Head.CFrame + workspace.NPC.Head.CFrame.LookVector * 2
workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
workspace.Camera.CameraType = "Scriptable"
wait(5) --Time until the camera focus the player
workspace.Camera.CameraType = "Custom"
local player = game.Players.LocalPlayer
workspace.Camera.CameraSubject = workspace[player.Name].Humanoid
workspace.Camera.CFrame = CF --place the camera in its old position
1 comment
1
what
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Do you mean like face the NPC?
focus camera at head, i need this in the dialogue
Do you want it to look at the npc's head or move to it altogether?