How to make the players camera face a certain way

I am trying to make a game where there are 4 windows a player can look out through and they can only view from those angles, but I want the player to keep full mouse FPS control.

Above is an example of what I am talking about, the players can only face where the arrows are facing.

What I have tried.

  1. Camera CFrame is a parts CFrame and it lookAt the players mouse.Hit position. This was too sensitive and if you looked straight up or down it bugs and will get players dizzy.

  2. Made camera mode lockfirstperson, this makes it so the camera type cannot be scriptable I think because it wouldn’t keep the cameras position at the camera parts position.

  3. Teleporting the player to the spot and having lockfirstperson, this could work but every time I tested and tried to fix the players camera will never look at where I want it to (Out to the arrows).

How can I put this in my game?

1 Like
local Player = game.Players.LocalPlayer
local character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.Window1Camera

local moveButtonR = script.Parent.MoveToRight
local moveButtonL = script.Parent.MoveToLeft
repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame

moveButtonR.MouseButton1Click:Connect(function()
	-- Move camera to another window
end)
moveButtonL.MouseButton1Click:Connect(function()
	-- Move camera to another window
end)

I hope it helped!

Thanks for your time. This doesn’t keep the first person movement affect, the camera is stationary. If I didn’t specify that in my post I’ll add it now.