Camera facing at the part

So I need again help cuz am bad lol.
I tried making camera face the zombies head when the animation plays. But I dont know what I should use :confused: something like (char.Head.CFrame, who.Value.CFrame)

runservice.Heartbeat:Connect(function()
	if data:WaitForChild("Glory").Value == true then
		cam.CameraType = Enum.CameraType.Scriptable
		cam.FieldOfView = 75
		cam.CFrame = data:WaitForChild("Glory"):WaitForChild("Who").Value.CFrame
	else
		cam.CameraType = Enum.CameraType.Custom
	end
end)
1 Like

I believe you can use the CFrame.new(position, lookAt) constructor. Position being the Vector3 which is were the camera would be positioned, and lookAt being the Vector3 where the camera would be facing, in this case your zombies head.

1 Like

Figured I should mention that this function has been superseded by the identical CFrame.lookAt, and that the original has been deprecated.

1 Like