Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make camera not move at all?

my local script in starter player scripts:

local cameraHeight = 12
local cameraZOffset = 20

local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer

CameraSubject = player

local function setupCamera()
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = CFrame.new(Vector3.new(0,cameraHeight,cameraZOffset),
Vector3.new(0,cameraHeight,0))
end
setupCamera()
player.CharacterAdded:Connect(setupCamera)

1 answer

✓ Accepted answer

Hello, iVmk3!

You need to edit the camera type:

local cameraHeight = 12
local cameraZOffset = 20

local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer

local function setupCamera()
    camera.CameraType = Enum.CameraType.Scriptable -- Enables scripts to move the camera
    camera.CFrame = CFrame.new(Vector3.new(0,cameraHeight,cameraZOffset),
Vector3.new(0,cameraHeight,0))
end
setupCamera()
player.CharacterAdded:Connect(setupCamera)

3 comments

0

You should set the CameraSubject.

0

What would the CameraSubject be?

0

I think you don't need to change CameraSubject, just cameraType

This discussion is preserved as it was. New answers, comments, and votes are closed.