Does anyone know how to do this with the camera?

I want to make it whereas the player cant move the camera at all (like they cant zoom or even rotate it) and it stays in this one position
Screenshot 2024-09-01 221838
does anyone know how to do it?

1 Like

something like shift lock but the player cant rotate or zoom their camera

1 Like

workspace.CurrentCamera.CameraType = Enum.CameraType.Fixed in a local script

2 Likes

i tried the script and it just took my camera to somewhere in the void, how can i direct it to my character?

workspace.Camera.CameraSubject = game.Players.localPlayer.Character.Head
or whatever body part of the player you need the camera to focus on
Edit: also set the cameratype to scriptable
workspace.Camera.CameraType = Enum.CameraType.Scriptable


i got this error when i tried it

oh if this is what you’re trying to make


then try making a local script, put it in StarterCharacterScripts and paste this in:

workspace.Camera.CameraType = Enum.CameraType.Scriptable
workspace.Camera.CameraSubject = script.Parent.Head

this should fix your error, also note that this will spawn the camera directly behind the player’s head

You can just set the camera’s type to scriptable and make it follow the character’s position with a certain offset. This will prevent the player from rotating or zooming the camera automatically.

local RS = game:GetService("RunService")
local PLS = game:GetService("Players")

local Client = PLS.LocalPlayer
local Character = Client.Character or Client.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")

local Camera = workspace.CurrentCamera

local Offset = Vector3.new(0, 10, 30) -- Modify it to your needs.

Camera:GetPropertyChangedSignal("CameraType"):Connect(function()
	Camera.CameraType = Enum.CameraType.Scriptable
end)

Camera.CameraType = Enum.CameraType.Scriptable

RS.RenderStepped:Connect(function()
	Camera.CFrame = CFrame.lookAt(HRP.Position + Offset, HRP.Position)
end)
1 Like

How can i rotate the camera? since the script works but i cant seem to get the camera to rotate where i want it, and modifying the offset isn’t helping it just makes the camera further