#help with camera

1 messages · Page 1 of 1 (latest)

ember geyser
#

so i've been trying to make a 1st person game and I want for the dialogue to make the player look at the npc by the camera pointing to the npc but I can't figure out a simple way to do it

ember geyser
dense mothBOT
#

studio** You are now Level 1! **studio

fluid stone
#

Yes

#

Use CFrame

ember geyser
#

how would i use it?

dim kindle
#

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

ember geyser
#

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
dim kindle
#

must be local

ember geyser
#

and does it work in 1st person?

vapid fern
ember geyser
vapid fern
#

ohh your gonna have to use tween service