배우기
엔진 클래스
Animator

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.



API 참조
속성
EvaluationThrottled
읽기 전용
복제되지 않음
병렬 쓰기
기능: Animation
Animator.EvaluationThrottled:boolean

PreferLodEnabled
병렬 읽기
기능: Animation
Animator.PreferLodEnabled:boolean

RootMotion
읽기 전용
복제되지 않음
찾아볼 수 없음
병렬 쓰기
기능: Animation
Animator.RootMotion:CFrame

RootMotionWeight
읽기 전용
복제되지 않음
찾아볼 수 없음
병렬 쓰기
기능: Animation
Animator.RootMotionWeight:number

메서드
ApplyJointVelocities
기능: Animation
Animator:ApplyJointVelocities(motors:Variant):()
매개 변수
motors:Variant
반환
()

GetPlayingAnimationTracks
기능: Animation
시뮬레이션 액세스
Animator:GetPlayingAnimationTracks():{any}
반환

GetTrackByAnimationId
기능: Animation
시뮬레이션 액세스
Animator:GetTrackByAnimationId(animationId:ContentId):AnimationTrack?
매개 변수
animationId:ContentId
코드 샘플
ID로 애니메이션 트랙 가져오기
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ANIM_ID = "rbxassetid://2515090838"
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
-- 캐릭터의 humanoid에 Animator 객체가 포함되어 있는지 확인합니다.
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
-- 새로운 애니메이션 인스턴스를 생성하고 애니메이션 자산 ID를 할당합니다.
local kickAnimation = Instance.new("Animation")
kickAnimation.AnimationId = ANIM_ID
-- 애니메이션을 animator에 로드합니다.
local kickAnimationTrack = animator:LoadAnimation(kickAnimation)
-- 짧은 지연 후 애니메이션 트랙을 재생합니다.
task.wait(3)
kickAnimationTrack:Play()
local startTime = tick()
RunService:BindToSimulation(function(deltaTime: number)
if tick() - startTime > 1 then
-- ID로 트랙을 가져오고 재생을 중지합니다.
local kickTrack = animator:GetTrackByAnimationId(ANIM_ID)
if kickTrack and kickTrack.IsPlaying then
kickTrack:Stop()
end
end
end)

LoadAnimation
기능: Animation
시뮬레이션 액세스
Animator:LoadAnimation(animation:Animation):AnimationTrack
매개 변수
animation:Animation

RegisterEvaluationParallelCallback
기능: Animation
Animator:RegisterEvaluationParallelCallback(callback:function):()
매개 변수
callback:function
반환
()

StepAnimations
플러그인 보안
기능: Animation
Animator:StepAnimations(deltaTime:number):()
매개 변수
deltaTime:number
반환
()
코드 샘플
로블록스 스튜디오에서 애니메이션 미리 보기
local RunService = game:GetService("RunService")
local function previewAnimation(model, animation)
-- AnimationController와 Animator 찾기
local animationController = model:FindFirstChildOfClass("AnimationController")
local animator = animationController and animationController:FindFirstChildOfClass("Animator")
if not animator then return end
-- 애니메이션을 로드하여 AnimationTrack 생성
local track = animationController:LoadAnimation(animation)
track:Play()
-- 애니메이션 미리 보기
local startTime = tick()
while (tick() - startTime) < track.Length do
local step = RunService.Heartbeat:wait()
animator:StepAnimations(step)
end
-- 애니메이션 중지
track:Stop(0)
animator:StepAnimations(0)
-- 관절 초기화
for _, descendant in pairs(model:GetDescendants()) do
if descendant:IsA("Motor6D") then
local joint = descendant
joint.CurrentAngle = 0
joint.Transform = CFrame.new()
end
end
end
local character = script.Parent
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://507765644"
previewAnimation(character, animation)

이벤트
AnimationPlayed
기능: Animation
Animator.AnimationPlayed(animationTrack:AnimationTrack):RBXScriptSignal
매개 변수
animationTrack:AnimationTrack

©2026 Roblox Corporation. Roblox 및 Roblox 로고, 'Powering Imagination'은 미국 및 기타 국가 내 당사의 등록 및 미등록 상표입니다.