Hi. This is just a brief overview of something you could do.

First, you woud need a `Vector2`

for the center of the screen.

```
local displayCenter = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2)
```

Inside of a function, I’m going to get the position of the mouse `x`

and `y`

coordinate on the screen. I’m dividing by some factor, which will control how much the camera should move with the mouse. The higher the value, the less the camera will move. `500`

is a good value, but you can play around with it yourself.

```
local function CameraMovement()
local x = -(mouse.X - displayCenter.X) / [SOME FACTOR]
local y = -(mouse.Y - displayCenter.Y) / [SOME FACTOR]
end
```

Constructing a `Vector3`

to apply to the camera.

```
local function CameraMovement()
local x = -(mouse.X - displayCenter.X) / [SOME FACTOR]
local y = -(mouse.Y - displayCenter.Y) / [SOME FACTOR]
local moveVector = Vector3.new(x, y, 0)
end
```

Constructing a `CFrame`

angle.

```
local function CameraMovement()
local x = -(mouse.X - displayCenter.X) / [SOME FACTOR]
local y = -(mouse.Y - displayCenter.Y) / [SOME FACTOR]
local moveVector = Vector3.new(x, y, 0)
local angle = CFrame.fromEulerAnglesXYZ(math.rad(moveVector.Y), math.rad(moveVector.X), math.rad(moveVector.Z))
end
```

Lastly, multiplying the calculated `CFrame`

with your default camera `CFrame`

```
local function CameraMovement()
local x = -(mouse.X - displayCenter.X) / [SOME FACTOR]
local y = -(mouse.Y - displayCenter.Y) / [SOME FACTOR]
local moveVector = Vector3.new(x, y, 0)
local angle = CFrame.fromEulerAnglesXYZ(math.rad(moveVector.Y), math.rad(moveVector.X), math.rad(moveVector.Z))
camera.CFrame = defaultPosition * angle
end
```

Connect this to `RenderStepped`

.

```
local cameraMovementConnection = RunService.RenderStepped:Connect(CameraMovement)
```

Hope this helps.