roblox-characters
하는 일
이 스킬은 리스폰, 사망, 그 밖의 변화를 견디는 Roblox 캐릭터 스크립트를 작성하는 방법을 보여 줍니다. Roblox 경험에서 플레이어 캐릭터를 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓플레이어가 Roblox에서 리스폰한 후 캐릭터 스크립트가 깨질 때.
- ✓Roblox에서 캐릭터 이동을 제어하거나, 애니메이션을 재생하거나, 사망을 처리해야 할 때.
- ✓플레이어 캐릭터에 도구를 장착하거나 액세서리를 바꾸고 싶을 때.
스킬 링크
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/other-engines/roblox-characters/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 Roblox 캐릭터가 리스폰한 후 속도가 원래대로 돌아가요. 스크립트를 어떻게 고쳐야 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
리스폰 후에도 플레이어는 그대로 유지되지만 캐릭터는 임시라는 점을 설명합니다. 그래서 에이전트는 오래 유지되는 데이터와 캐릭터별 연결을 분리하고, 후자는 정리합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Roblox characters
Treat a Player as the durable identity and each Character as a replaceable session with its own
references, connections, animation tracks, and cleanup. Targets Roblox's rolling platform APIs.
When to use
- Use for player-character lifecycle, Humanoid state/movement, rigs, animations, tools, accessories, custom characters, death, or respawn defects.
- Use whenever code stores a Character/Humanoid/root reference longer than one spawn.
When not to use: general physics queries and constraints belong to roblox-physics; remote
trust belongs to roblox-networking; camera logic belongs to camera-systems.
Workflow
- Inspect the character contract. Check avatar settings,
StarterCharacter,StarterCharacterScripts,CharacterAutoLoads, R6/R15 support, existing Animate/controller scripts, tools, tags, collision groups, and server/client ownership. - Separate scopes. Player-scope state survives respawn; character-scope state does not. Put character connections/tracks/resources in one cleanup scope and destroy it on removal.
- Bind existing and future characters. Connect
CharacterAdded, then bindplayer.Characterif present. Do not assume event subscription alone sees a character that already spawned. - Resolve required components defensively. Wait with a timeout where replication warrants it;
validate
Humanoid, root,Animator, and rig assumptions. Abort if that character is no longer current before applying delayed work. - Choose movement ownership. Use Humanoid movement for standard avatars; use
AssemblyLinearVelocity,BasePart:ApplyImpulse(), or aLinearVelocity/AlignPositionconstraint only for mechanics that need physical control. Keep gameplay authority and network ownership implications explicit. - Own animation lifecycle. Load via the rig's
Animator; store tracks/connections; use named markers for gameplay timing only with server validation; stop/disconnect on character cleanup. - Verify lifecycle stress. Spawn, die, reset, rapid-respawn, swap rig if supported, equip/drop tools, leave during setup, and run with at least two players when character interactions matter.
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 invocation (see the CharacterAdded/defer race below) must not
-- clear a binding that is already current, or nothing ends up bound at all.
if player.Character ~= character then return end
clearCharacter()
currentCharacter = character
local thisGeneration = generation
local humanoid = character:WaitForChild("Humanoid", 10)
local root = character:WaitForChild("HumanoidRootPart", 10)
-- Re-check after the yields: 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; do not introduce a new 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; server still validates any hit
end)
track:Play(0.1)
-- On character teardown:
markerConnection:Disconnect()
track:Stop(0.1)
animation:De
자주 묻는 질문
Roblox에서 플레이어와 캐릭터의 차이는 무엇인가요?
플레이어는 게임을 하는 동안 그대로 유지되고, 캐릭터는 생성될 때마다 새로 만들어지는 몸입니다.
R6와 R15 리그도 다루나요?
네. 이 스킬은 애니메이션과 캐릭터 파트를 설정할 때 두 가지 리그 타입을 모두 다룹니다.
물리나 리모트도 다루나요?
그것들은 별도의 Roblox 스킬입니다. 하나는 물리, 다른 하나는 네트워킹을 다룹니다.
상세 정보
작성자의 원본 설명
Build respawn-safe Roblox character systems around Players, CharacterAdded/CharacterRemoving, Humanoid, HumanoidRootPart, Animator, R6/R15 rigs, movement, animations and markers, death, tools, accessories, ownership, and custom characters. Use when character scripts break after respawn, cache stale Humanoids, control movement or velocity, load AnimationTracks, handle death, equip Tools, modify avatars, or support custom player rigs.
인기도
- GitHub 스타
- 6.6k
- 순위
- #13836
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
router
6.6k에이전트가 엔진과 작업 종류를 파악해, 요청에 맞는 게임 개발 스킬을 골라 주도록 돕습니다.
ai-behavior-trees-utility-ai
6.6k에이전트가 적이나 캐릭터가 우선순위와 점수로 행동을 고르는 행동 트리와 유틸리티 AI 시스템을 만들도록 돕습니다.
audio-design
6.6k에이전트에게 게임 오디오 믹싱을 가르칩니다. 버스, 데시벨 음량, 대사 아래에서의 덕킹, 적응형 음악, 효과음 변주를 다룹니다.
camera-systems
6.6k에이전트가 부드럽게 따라가고, 레벨 안에 머물고, 3D에서 회전하거나 둘러볼 수 있는 게임 카메라를 만들도록 돕습니다.