К основному содержанию
скилл CX Codex

roblox-input · el4cteo — скилл для Claude Code: управление и установка

Скилл roblox-input для Claude Code настраивает ввод игрока и камеры в Roblox. Он подключается к задачам с клавишами, способностями, транспортом, сенсорными кнопками или собственной камерой.

MIT 1 200 установок ★ 131 обновлён 2026-11-03

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add EL4CTEO/roblox-skills --skill roblox-input -a claude-code
Открыть на GitHub

Что делает roblox-input

Скилл разбирает системы ввода Roblox и помогает выбрать способ для новых игровых действий или существующего кода. Он охватывает Input Action System, события UserInputService и совместимый со старым кодом ContextActionService, а также привязки клавиш для разных устройств и экранные кнопки.

Материал объясняет, как переключать схемы управления, учитывать выбранное устройство и обрабатывать уже использованный игрой ввод. Для собственной камеры описан вызов BindToRenderStep. Ввод обрабатывается на клиенте, а сервер должен проверять команды, полученные через remotes.

Какие задачи решает

  • назначить действие на клавиатуру и геймпад
  • добавить экранную кнопку для сенсорного управления
  • переключать управление между меню и игровым режимом
  • обработать ввод мыши, касаний или геймпада
  • настроить собственную камеру

Примеры запросов агенту

  • Добавь спринт на клавиатуру и геймпад в Roblox.
  • Сделай экранную кнопку для способности и переключение управления между меню и игрой.
  • Настрой собственную камеру и обработай ввод мыши.

Как установить roblox-input

1Через Skills CLI (Vercel)

npx skills add EL4CTEO/roblox-skills --skill roblox-input -a claude-code

2Вручную: положить файлы

~/.claude/skills/roblox-input/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/roblox-input/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о roblox-input

Как установить roblox-input в Claude Code?

Выполни npx skills add EL4CTEO/roblox-skills --skill roblox-input -a claude-code. Файл скилла появится по пути ~/.claude/skills/roblox-input/SKILL.md.

Что делает roblox-input?

Помогает настроить ввод игрока и камеры в Roblox: от действий для разных устройств до экранных кнопок и собственной камеры. Также описывает обработку ввода и разделение клиентской логики с серверной проверкой.

Когда roblox-input использует Input Action System?

Она предназначена для новых игровых действий с привязками для разных устройств. Для необработанных событий и жестов описан UserInputService, а ContextActionService подходит для простых или уже существующих привязок.

Исходный текст

SKILL.md · MIT
---
name: roblox-input
description: Player input and cameras across keyboard/mouse, touch, gamepad, VR - Input Action System (InputContext, InputAction, InputBinding), UserInputService (PreferredInput, gameProcessedEvent, mouse lock), ContextActionService, reserved keys, custom cameras with BindToRenderStep. Use when adding controls, keybinds, abilities, vehicles, on-screen buttons, or custom cameras.
---

# Roblox input and camera

## Choose an approach

| Approach | Use when |
| --- | --- |
| **Input Action System** (`InputContext` → `InputAction` → `InputBinding`) | New gameplay controls. Cross-device bindings configured as instances, contexts you enable/disable, built-in on-screen button binding, prompt display. Recommended. |
| `UserInputService` events | Raw input, text-free hotkeys, mouse position/delta, touch gestures, device detection. |
| `ContextActionService:BindAction` | Legacy/simple bind-with-mobile-button; existing code. |

All input handling is **client-side**. Send *intent* to the server via remotes; the server validates.

## Input Action System

Build and audit it visually in the **Input Action Manager** (Window → Input → Input Action Manager; fully
released): a table of contexts/actions/bindings per device that flags missing bindings and duplicate keys,
and shows live action state in Play Solo.

Structure (typically in `ReplicatedStorage.Inputs`, or created from a client script):

```text
Inputs (Folder)
  PlayContext (InputContext, Priority 1000)      -- gameplay controls
    Sprint (InputAction, Type = Bool)
      Keyboard (InputBinding, KeyCode = LeftShift)
      Gamepad  (InputBinding, KeyCode = ButtonL3)
      Touch    (InputBinding, UIButton = <on-screen TextButton>)
  MenuContext (InputContext, Priority 2000, Sink = true, Enabled = false)
```

- `InputAction.Type`: `Bool` (press/release), `Direction1D` (triggers, zoom), `Direction2D` (move, camera),
  `Direction3D` (flying), `ViewportPosition` (pointer position).
- Events: `Pressed`, `Released` (Bool only), `StateChanged(value)` for every type. `action:GetState()` reads the current value.
- `InputBinding` fields: `KeyCode`; composite directions `Up/Down/Left/Right/Forward/Backward`; `Scale`
  (e.g. `0.01` for `MouseDelta`/`TouchDelta`); `PressedThreshold`/`ReleasedThreshold` for analog triggers;
  `PrimaryModifier`/`SecondaryModifier` for chords (Ctrl+S); `UIButton` to drive the action from a GUI button;
  `DisplayName`/`DisplayImage` for prompts.
- `InputContext.Enabled` switches whole control schemes (gameplay ↔ menu ↔ vehicle); `Priority` + `Sink`
  lets a higher context consume keys so lower contexts don't also fire.
- Set `Workspace.PlayerScriptsUseInputActionSystem = Enabled` to have Roblox's default player/camera
  scripts use the system too (required for server authority).

```luau
--!strict
-- Client: build a Sprint action in code and react to it.
local Players = game:GetService("Players")

local player = Players.LocalPlayer

local context = Instance.new("InputContext")
context.Name = "PlayContext"
context.Priority = 1000

local sprint = Instance.new("InputAction")
sprint.Name = "Sprint"
sprint.Type = Enum.InputActionType.Bool
sprint.Parent = context

local keyboard = Instance.new("InputBinding")
keyboard.KeyCode = Enum.KeyCode.LeftShift
keyboard.Parent = sprint

local gamepad = Instance.new("InputBinding")
gamepad.KeyCode = Enum.KeyCode.ButtonL3
gamepad.Parent = sprint

context.Parent = player:WaitForChild("PlayerScripts")

local function setSprinting(on: boolean)
	local character = player.Character
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		humanoid.WalkSpeed = if on then 24 else 16 -- server should validate/own real speed limits
	end
end

sprint.Pressed:Connect(function()
	setSprinting(true)
end)
sprint.Released:Connect(function()
	setSprinting(false)
end)
```

Show the right key/button: an `InputActionLabel` (beta) auto-renders the binding for the current device,
or read `action.PreferredBinding` (+ its `DisplayName`/`KeyCode`) and `UserInputService:GetStringForKeyCode`
/ `GetImageForKeyCode`, updating on `GetPropertyChangedSignal("PreferredBinding")`.

## UserInputService essentials

```luau
--!strict
local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(input: InputObject, gameProcessedEvent: boolean)
	if gameProcessedEvent then
		return -- typing in a TextBox, clicking UI, or a core-script action consumed it
	end
	if input.KeyCode == Enum.KeyCode.E then
		print("interact")
	elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
		print("click at", input.Position)
	end
end)

local function onPreferredInputChanged()
	local preferred = UserInputService.PreferredInput -- KeyboardAndMouse | Touch | Gamepad
	print("show prompts for", preferred)
end
UserInputService:GetPropertyChangedSignal("PreferredInput"):Connect(onPreferredInputChanged)
onPreferredInputChanged()
```

- **Always honor `gameProcessedEvent`** or players trigger abilities while typing in chat.
- `PreferredInput` reflects what the player is actually using (phone + Bluetooth gamepad → `Gamepad`);
  don't branch on `TouchEnabled`/`KeyboardEnabled` alone.
- Mouse: `UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter` for FPS (set every frame while
  in first person if other scripts may reset it), `GetMouseLocation()` (includes top-bar inset),
  `MouseDeltaSensitivity`, `MouseIconEnabled`.
- Gamepad: `GetConnectedGamepads`, `GamepadConnected/Disconnected`, thumbstick `input.Position` in
  `InputChanged` (apply a dead zone ≈ 0.15). Haptics: `HapticService` / `HapticEffect`.
- Touch: `TouchTap`, `TouchLongPress`, `TouchPinch`, `TouchSwipe`; hide default controls only if you
  replace them (`GuiService.TouchControlsEnabled`).
- Reserved keys you can't override: Esc/Start (menu), F9 (console), F11, F12, PrintScreen; chat `/`,
  Tab (player list), backpack and tool-number keys unless you disable those core features.

## ContextActionService (legacy-compatible)

`ContextActionService:BindAction(name, handler, createTouchButton, ...inputs)` with handler
`(actionName, inputState, inputObject) -> Enum.ContextActionResult?`; return `Pass` to let other
bindings see the input. Use `BindActionAtPriority` for ordering and `UnbindAction` when the context
ends (e.g. tool unequipped). Prefer the Input Action System for new work.

## Custom cameras

```luau
--!strict
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local camera = workspace.CurrentCamera
local OFFSET = Vector3.new(0, 30, 20)

camera.CameraType = Enum.CameraType.Scriptable

RunService:BindToRenderStep("TopDownCamera", Enum.RenderPriority.Camera.Value + 1, function()
	local character = Players.LocalPlayer.Character
	local root = character and character:FindFirstChild("HumanoidRootPart") :: BasePart?
	if root then
		local target = root.Position
		camera.CFrame = CFrame.lookAt(target + OFFSET, target)
	end
end)

-- Restore: RunService:UnbindFromRenderStep("TopDownCamera"); camera.CameraType = Enum.CameraType.Custom
```

- Update cameras in `BindToRenderStep` (runs before render, ordered), not `Heartbeat`/`task.wait` loops.
- Smooth with `camera.CFrame:Lerp(goal, 1 - math.exp(-speed * deltaTime))` (frame-rate independent).
- First person: `player.CameraMode = Enum.CameraMode.LockFirstPerson`; zoom limits with
  `player.CameraMinZoomDistance`/`CameraMaxZoomDistance`. Shake: offset the CFrame, don't move parts.
- Screen → world: `camera:ViewportPointToRay(x, y)` / `ScreenPointToRay` + `workspace:Raycast`.

## Cross-platform checklist

- Every action has keyboard, gamepad, **and** touch bindings (touch via `UIButton` or on-screen buttons).
- Prompts/hints update when `PreferredInput` changes. Console UI is navigable with D-pad and closes with B.
- No hover-only interactions (touch has no hover). Hold-to-confirm for destructive actions.
- Test in Studio's Device Simulator (touch hints included) and Controller Emulator.

## Related skills

`roblox-ui` (buttons, gamepad selection), `roblox-characters-animation` (movement, abilities),
`roblox-networking` (sending intents), `roblox-physics` (vehicles).

© EL4CTEO · MIT · EL4CTEO/roblox-skills

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →

Сначала — roblox-input от других авторов.

roblox-input TabooHarmony Скилл roblox-input для работы с вводом в Roblox: тач, геймпад, клавиатура, мышь, кнопки на экране и кросс-платформенные привязки. CX Codex +1 3 100установок input-keyboard-mouse-touch phaserjs Скилл input-keyboard-mouse-touch для Claude Code обрабатывает ввод в Phaser 4: клавиатуру, мышь, касания, перетаскивания и геймпад. CX Codex +1 1 200установок godot-input-handling thedivergentai Скилл godot-input-handling для Codex описывает обработку ввода в Godot: InputMap, геймпады, ребинд, мёртвые зоны и буферизацию. Используется при настройке управления персонажем и поддержке контроллера. CX Codex +1 593установок roblox-ui gamedev-skills Скилл roblox-ui для Claude Code помогает проектировать интерфейсы Roblox с учётом экранов телефонов и геймпадов. CX Codex +1 9 900установок roblox-gui TabooHarmony Скилл roblox-gui для Claude Code задаёт правила адаптивной вёрстки интерфейсов Roblox. Помогает адаптировать HUD и магазины под смартфоны и консоли. CX Codex +1 3 700установок roblox-camera TabooHarmony Скилл roblox-camera для Claude Code и Codex: скриптинг камеры в Roblox через CFrame, рейкасты с экрана, переключение видов и катсцены. Решает проблемы с дрожанием камеры и пересечением геометрии. CX Codex +1 3 300установок input-systems gamedev-skills Скилл input-systems для Claude Code проектирует систему игрового ввода с именованными действиями и привязками к устройствам. Включается при настройке геймпада, переназначения клавиш или обработке пропущенных нажатий. CX Codex +1 13 700установок

Из того же набора22

Весь набор →
roblox-monetization Скилл roblox-monetization для Claude Code помогает настраивать монетизацию в Roblox и разбирать сбои покупок. Подключается при работе с магазинами, пропусками, подписками, рекламой и платными случайными предметами. CX Codex +1 1 200установок roblox-physics Скилл roblox-physics для Claude Code управляет физикой и пространственными запросами. Подключается при настройке столкновений, лучей и транспорта. CX Codex +1 1 200установок roblox-npc-ai Скилл roblox-npc-ai для Claude Code помогает создавать ИИ врагов, питомцев и других NPC в Roblox. Используется для настройки поиска пути, преследования, атак и поведения персонажей, а также для исправления застревающих NPC. CX Codex +1 1 200установок roblox-teleport-matchmaking Скилл roblox-teleport-matchmaking для Claude Code управляет телепортацией игроков и созданием матчей в Roblox через TeleportService. CX Codex +1 1 200установок roblox-analytics-liveops Скилл roblox-analytics-liveops для Claude Code настраивает игровую аналитику, воронки, экономику и live-ops на Lua. Включается при добавлении событий, A/B-тестов или начислении наград. CX Codex +1 1 200установок roblox-audio Скилл roblox-audio для Claude Code помогает настраивать звук в Roblox: музыку, эффекты и пространственное аудио. Включается при добавлении звука или поиске причины, по которой он не воспроизводится. CX Codex +1 1 200установок roblox-networking Скилл roblox-networking для Claude Code управляет сетевым взаимодействием клиента и сервера на Roblox, помогая настраивать RemoteEvent, RemoteFunction и оптимизировать трафик. CX Codex +1 1 200установок roblox-data-stores Скилл roblox-data-stores для Claude Code помогает проектировать сохранение данных игроков и облачные сервисы Roblox. Включается при настройке таблиц лидеров, очередей или устранении потери и дублирования данных. CX Codex +1 1 200установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой