Skip to content
Agentmart
Submit a tool

roblox-camera

Roblox camera: default camera settings, Scriptable cameras, CFrame math, screen raycasts, first/third person, occlusion, cutscenes, screen shake.

Skill by JashanMaan28

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jashanmaan28-roblox-camera

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Roblox camera: default camera settings, Scriptable cameras, CFrame math, screen raycasts, first/third person, occlusion, cutscenes, screen shake. Use when scripting or fixing camera behavior.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/roblox-camera

What's inside

Skill name
roblox-camera
Description
Roblox camera: default camera settings, Scriptable cameras, CFrame math, screen raycasts, first/third person, occlusion, cutscenes, screen shake. Use when scripting or fixing camera behavior.
License
MIT
Instructions
55 lines in SKILL.md · view on GitHub

Files (4)

  • ATTRIBUTION.md
  • LICENSE
  • SKILL.md
  • full.md · references/

SKILL.md (first lines)

# Roblox Camera

## When to Load

Load when scripting custom camera behavior (cutscenes, third-person follow, custom rotation), manipulating `CFrame` for placement/rotation, raycasting from the screen, or building a non-default player view. Client-only.

## Quick Reference

**The Camera**: `workspace.CurrentCamera`: one per client. Set `CameraType = Scriptable` to disable defaults and take full control. Without it, defaults overwrite your CFrame every frame.

**CameraType**: `Fixed`, `Attach`/`Watch`/`Track`/`Follow` (subject-following), `Custom` (default), `Scriptable` (no default), `Orbital` (fixed Y, rotates around player). `CameraSubject` cannot be `nil`: setting it reverts.

**Key properties**: `CFrame`, `CameraSubject`, `FieldOfView` (deg), `FieldOfViewMode` (`Vertical`/`Diagonal`), `NearPlaneZ`, `ViewportSize`, `HeadLocked`, `HeadScale`, `Focus`.

**CFrame essentials**:

| Operation | Luau |
| --- | --- |
| Position only | `CFrame.new(position)` |
| Look at target | `CFrame.lookAt(position, target, upVector)` |
| XYZ rotation | `CFrame.Angles(rx, ry, rz)` |
| Local to world | `cf * Vector3.new(0, 0, 10)` |
| Interpolate | `cf:Lerp(goal, alpha)` |
| Unit axes | `cf.LookVector`, `cf.RightVector`, `cf.UpVector` |

**Custom camera loop**: always `PreRender`, never `Heartbeat`:

```luau
camera.CameraType = Enum.CameraType.Scriptable
RunService.PreRender:Connect(function(dt)
    local desired = CFrame.lookAt(head.Position - offset, head.Position)
    camera.CFrame = camera.CFrame:Lerp(desired, math.min(dt * 10, 1))
end)
```

**Raycasting from camera**: `camera:ScreenPointToRay(mx, my)` (accounts for GUI inset) vs `camera:ViewportPointToRay(mx, my)` (raw, NO inset). `ScreenPointToRay` returns a unit Ray (1 stud); multiply `Direction` by length for the actual raycast.

**Customise before replacing**: `StarterPlayer`/`Player` `CameraMode` (`LockFirstPerson`), `CameraMinZoomDistance`/`CameraMaxZoomDistance`, `DevCameraOcclusionMode` (`Zoom`/`Invisicam`), `EnableMouseLockOption`/`DevEnableMouseLock` (shift-lock), `Humanoid.CameraOffset`. Layer effects on the default camera with `RunService:BindToRenderStep(name, Enum.RenderPriority.Camera.Value + 1, fn)`.

**Custom third-person**: raycast/spherecast from the focus to the desired camera position and pull in on hit (full.md "Occlusion").

**Accessibility**: check `GuiService.ReducedMotionEnabled` before shake, bob or sway.

**Pitfalls**:
- Client-only. Server sets silently dropped.
- Without `Scriptable`, defaults overwrite your CFrame every frame.
- `PreRender` for camera (visual sync). `Heartbeat` adds 1-frame lag. `RenderStepped` still works but is superseded by `PreRender`.
- `Camera.CFrame` lacks VR head rotation; use `GetRenderCFrame()` for the true view.
- `SetRoll` is outdated; apply roll via `CFrame.Angles(0, 0, roll)` on CFrame. `Interpolate`, `PanUnits`, `TiltUnits` are deprecated (tween `CFrame` with `TweenService`).
- `WorldToScreenPoint`/`WorldToViewportPoint` return a tuple `(Vector3, onScreen: boolean)`.
- `CFrame.new(pos, lookAt)` is legacy (back-compat only); use `CFrame.lookAt(at, lookAt)` for new code.

See [references/full.md](references/full.md) for default-camera settings, first/third-person recipes, occlusion, cutscenes, screen shake, mouse-look, full API. Input bindings: `roblox-input`.

From JashanMaan28/roblox-agent-kit, MIT.

More from JashanMaan28/roblox-agent-kit

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 19, 2026 (10 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from JashanMaan28

Cite this page

roblox-camera skill. Agent Mart. https://agentmart.dev/skills/jashanmaan28-roblox-camera (last updated 2026-10-24)