원클릭으로
roblox-camera
Use when scripting Roblox camera behavior, CFrame placement, screen raycasts, first or third-person views, or cutscenes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when scripting Roblox camera behavior, CFrame placement, screen raycasts, first or third-person views, or cutscenes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when implementing Roblox character animations, particles, beams, trails, tweens, camera shake, or other visual effects.
Use when building Roblox menus, HUDs, shops, notifications, dialogs, or responsive cross-platform UI.
Use when handling Roblox keyboard, mouse, gamepad, touch, motion input, or cross-platform action binding.
Use when validating RemoteEvent or RemoteFunction arguments, adding rate limits, designing server-authoritative systems, or preventing exploits.
Use when creating Roblox NPCs or enemies with pathfinding, state machines, line-of-sight or FOV detection, spawns, or AI update loops.
Use when building Roblox vehicles, ragdolls, projectiles, elevators, constraints, forces, or other physics-driven gameplay.
| name | roblox-camera |
| description | Use when scripting Roblox camera behavior, CFrame placement, screen raycasts, first or third-person views, or cutscenes. |
| last_reviewed | "2026-06-29T00:00:00.000Z" |
| sources | ["https://create.roblox.com/docs/reference/engine/classes/Camera","https://create.roblox.com/docs/reference/engine/enums/CameraType","https://create.roblox.com/docs/reference/engine/datatypes/CFrame"] |
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.
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:
CFrame.new(pos)
CFrame.lookAt(at, lookAt, up?) -- preferred over deprecated CFrame.new(pos, lookAt)
CFrame.Angles(rx, ry, rz) -- XYZ Euler (radians)
cf * Vector3.new(0, 0, 10) -- local offset → world
cf:Lerp(goal, alpha) -- 0..1 linear interp
cf.LookVector / RightVector / UpVector -- world-space unit axes
Custom camera loop — always RenderStepped, never Heartbeat:
camera.CameraType = Enum.CameraType.Scriptable
RunService.RenderStepped: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 actual raycast.
Pitfalls:
Scriptable, defaults overwrite your CFrame every frame.RenderStepped for camera (visual sync). Heartbeat adds 1-frame lag.Camera.CFrame lacks VR head rotation — use GetRenderCFrame() for true view.SetRoll is outdated — apply roll via CFrame.Angles(0, 0, roll) on CFrame.CameraSubject = nil reverts to previous.CFrame.new(pos, lookAt) is legacy (back-compat only) — use CFrame.lookAt(at, lookAt) for new code.ScreenPointToRay ≠ ViewportPointToRay (GUI inset). Use ScreenPointToRay for mouse input.See references/full.md for first/third-person recipes, cutscenes, screen shake, mouse-look, full API.