#help with camera
1 messages · Page 1 of 1 (latest)
CFrame.
isn't CFrame just position and orientation, I need it to look at an npc
** You are now Level 1! **
how would i use it?
use cframe.lookat
heres a example
local c = workspace.CurrentCamera local parttolookat = workspace.lalala if c and parttolookat then c.CameraType = Enum.CameraType.Scriptable c.CFrame = CFrame.lookAt(c.CFrame.Position,parttolookat.Position) end
made this in my console bar rq
oh
bad format
dam i forgot how to lua format it
but yeah
thats a example
use tween if yw it to not change instantly
it didn't work. this is my code
local Location = game.Workspace.Location
local camera = game.Workspace.CurrentCamera
ProximityPrompt.Triggered:Connect(function(Player)
camera.CameraType = Enum.CameraType.Scriptable
Player.Character.HumanoidRootPart.CFrame = Location.CFrame
camera.CFrame = CFrame.lookAt(camera.CFrame.Position,workspace.Jimmy.Head.Position)
end)```
I put it in a server script
you cant manipulate the camera from a server script
must be local
actually why dont you just manually lock it to first person
i did, Im making a game that is in 1st person and im wondering how to make it so that when I interact with an npc how to make your camera turn to that npc.
ohh your gonna have to use tween service