roblox-characters
БесплатноБез исполняемых скриптовНе проверенRoblox player characters: CharacterAdded lifecycle, Humanoid and HumanoidRootPart, R6, R15 and custom rigs, respawn and Tools. Use when a character script…
от gamedev-skills★ 12 656 звёзд на GitHubОб этом скилле
Roblox characters
A Player is the durable identity; each Character is a replaceable session with its own
references, connections, animation tracks, and cleanup. Most character bugs are one character's
state leaking into the next.
Workflow
- Read the character contract. Avatar Settings (rig type, movement system),
StarterCharacter,StarterCharacterScripts,Players.CharacterAutoLoads,Workspace.PlayerCharacterDestroyBehavior, the existing Animate or controller scripts, tools, tags, and collision groups. Extend what is there; do not add a second controller. - Separate scopes. Player-scope state survives respawn; character-scope state does not. Put each character's connections, tracks, and temporary instances in one cleanup scope.
- Bind existing and future characters. Connect
CharacterAdded, then bindplayer.Characterif it already exists. On the server, do this for players already inPlayers:GetPlayers(). - Resolve parts defensively.
WaitForChildwith a timeout forHumanoid, the root part, andAnimator; after every yield, check the character is still the current one before acting. - Choose one movement owner per state. Standard avatars use Humanoid movement or the Character Controller Library. Physical mechanics (dash, knockback, grapple) use an impulse or a constraint for their duration and hand control back cleanly.
- Own animation lifecycle. Load through the rig's
Animator, keep tracks and marker connections in the character scope, and stop them on cleanup. Markers drive presentation; any gameplay effect they trigger is validated on the server. - Run the lifecycle check. With the Studio MCP server connected, start play, respawn the
player several times from
execute_luauon theServerdatamodel (for _ = 1, 5 do player:LoadCharacterAsync() task.wait(1) end), then readget_console_output: expect no errors and exactly one setup log per spawn. Without MCP, ask the user to reset five times in Test and once with two players in Server & Clients, and to report duplicated logs, stuck animations, or errors.
Pattern: replaceable character scope
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local generation = 0
local connections: {RBXScriptConnection} = {}
local currentCharacter: Model? = nil
local function clearCharacter()
generation += 1
for _, connection in connections do connection:Disconnect() end
table.clear(connections)
currentCharacter = nil
end
local function bindCharacter(character: Model)
-- Guard before teardown: a stale call must not clear a binding that is already current.
if player.Character ~= character or currentCharacter == character then return end
clearCharacter()
currentCharacter = character
local thisGeneration = generation
local humanoid = character:WaitForChild("Humanoid", 10)
local root = character:WaitForChild("HumanoidRootPart", 10)
-- A respawn during WaitForChild bumps generation and makes this call stale.
if not humanoid or not root or generation ~= thisGeneration then return end
table.insert(connections, humanoid.Died:Connect(function()
if generation ~= thisGeneration then return end
setCharacterUiEnabled(false)
end))
attachCurrentCharacterSystems(character, humanoid, root)
end
player.CharacterRemoving:Connect(function(character)
if currentCharacter == character then clearCharacter() end
end)
player.CharacterAdded:Connect(bindCharacter)
if player.Character then task.defer(bindCharacter, player.Character) end
Use the project's cleanup utility when one exists rather than introducing a framework for three
connections. Server systems repeat this binding per Player and clear player-scope tables on
PlayerRemoving.
Pattern: animation through Animator and markers
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://1234567890"
local track = animator:LoadAnimation(animation)
local markerConnection = track:GetMarkerReachedSignal("Commit"):Connect(function(parameter)
playLocalSwingEffect(parameter) -- presentation only; the server validates any hit
end)
track:Play(0.1)
-- On character teardown:
markerConnection:Disconnect()
track:Stop(0.1)
animation:Destroy()
Rigs without a Humanoid need an AnimationController with an Animator. Humanoid:LoadAnimation()
is deprecated; always load through the Animator.
Movement and rig rules
- If R6 is supported, do not hardcode R15 limb names. Prefer attachments, tags, or a small rig
adapter; branch on
Humanoid.RigTypeonly where topology really differs. HumanoidRootPartis the usual assembly root, not a guarantee for custom models. Write down the custom rig contract and validate it at spawn.- Setting
AssemblyLinearVelocityis an instant change; useApplyImpulsefor one-off pushes and aLinearVelocityconstraint for sustained
Установить roblox-characters в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл roblox-characters?
Roblox player characters: CharacterAdded lifecycle, Humanoid and HumanoidRootPart, R6, R15 and custom rigs, respawn and Tools. Use when a character script breaks after respawn, animations do not play or replicate, or sprint code fights the Humanoid. Not for hit validation (`roblox-networking`), forces and raycasts (`roblox-physics`) or cameras (`camera-systems`).
Как установить скилл roblox-characters?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл roblox-characters запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic