How do I make the camera immovable in first person?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to make the camera immovable while being in first person

  2. What is the issue? I can still move the camera

  3. What solutions have you tried so far? The only helpful thread wasn’t answered so i made one

my code:

game:GetService("ReplicatedStorage"):WaitForChild("PurpleHollow").p.OnClientEvent:Connect(function(p)
	workspace.Camera.CameraType = Enum.CameraType.Fixed
	workspace.Camera.CameraSubject = p  -- P is the part that i created on the server which will act as the angle of the camera

	game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
	
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Try to print something in the output ! :grinning:

The code executes fine, but i’m asking for a method or a function to keep players locked in first person while not being able to move their camera.

Okay, i found the mistake i guess. CameraSubject is a part that camera is locked to. Originally CameraSubject is player, so you can rotate it around the player. If you set camera subject as a part, you will be able to rotate your camera around the part only.

image

Here is what you’ve done:

image

Just remove

workspace.Camera.CameraSubject = p

If you want camera to look on this part, do:

Camera.CFrame = CFrame.new(player.Character.Head.Position, p.Position)

I want the camera to be an aerial view of the player

How do I do that?
Like this perspective

wait(5)
while 1 do
    wait()
    workspace.CurrentCamera.CFrame = CFrame.new(p.Position,player.Character.HumanoidRootPart.Position)
end

Maybe you want this? Put it in local script

Yes, this worked perfectly!
Thank you so much man

No problem, ur welcome. Text me with any problems!