I was making a horror game and I wanted to place a few like mini jumpscares in which the player is forced to see them. I think it might have to do something with cframe angles, but I just can't figure it out. Additionally, I used the focus property and that did not work.
I finally found an answer with the Devforum!
local Camera = workspace.CurrentCamera local Goal = game.Workspace.Part local RS = game:GetService("RunService") RS.Stepped:Connect(function() local LookDirection = CFrame.new(Camera.CFrame.Position, Goal.Position) local NewCFrame = CFrame.new(Camera.CFrame.Position) * LookDirection Camera.CFrame = Camera.CFrame:lerp(NewCFrame, .02) end)
The link: https://devforum.roblox.com/t/camera-focus-on-a-part/472675/16