Humanoid
Humanoid : Instance
Overview
Humanoid ๊ฐ์ฒด๋ ๋จ์ํ ๋ชจ๋ธ ์ธ์คํด์ค๋ฅผ ์ค์ ์บ๋ฆญํฐ์ฒ๋ผ ๋์ํ๋๋ก ๋ง๋๋ ํต์ฌ ์์๋ก, ์ด๋ฅผ ํตํด ์บ๋ฆญํฐ๋ ๊ฒ์ ์์์ ๊ฑท๊ฑฐ๋ ์ ํํ๋ ๊ธฐ๋ณธ์ ์ธ ์์ง์์ ์ํํ๋ฉฐ ๋ค์ํ ์ค๋ธ์ ํธ์ ์ํธ์์ฉํ ์ ์์ต๋๋ค.
Humanoid๋ ์ต์์ ์ค๋ธ์ ํธ์ธ Model(Character)์ ํ์์ ์ํ๋ฉฐ, ์บ๋ฆญํฐ์ ํ๋๊ณผ ์ํ๋ฅผ ์ ์ดํ๋ Humanoid, ์บ๋ฆญํฐ์ ์ค์ฌ์ ๋ด๋นํ๋ HumanoidRootPart, ๋จธ๋ฆฌยท๋ชธํตยท์ํยท์๋ค๋ฆฌ๋ก ์ด๋ฃจ์ด์ง 6๊ฐ์ MeshPart, ๊ทธ๋ฆฌ๊ณ 22๊ฐ์ Bone์ผ๋ก ๊ตฌ์ฑ๋ Skeleton ๊ตฌ์กฐ๋ก ์ด๋ฃจ์ด์ ธ ์์ต๋๋ค.
Properties
AutoJumpEnabled
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
AutoRotate
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
AutomaticScalingEnabled
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
CameraOffset
Vector3
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
DisplayDistanceType
Enum.HumanoidDisplayDistanceType
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
DisplayName
string
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
Health
number
ํด๋จธ๋ ธ์ด๋์ ํ์ฌ ์ฒด๋ ฅ์ ๋ํ๋ด๋ ์์ฑ์ ๋๋ค.
๊ฐ์ 0 ์ด์ MaxHealth ์ดํ ๋ฒ์์์๋ง ์ ํจํ๋ฉฐ, ๋ฒ์๋ฅผ ๋ฒ์ด๋ ๊ฐ์ ์๋์ผ๋ก ํด๋น ๊ตฌ๊ฐ ๋ด๋ก ๋ณด์ ๋ฉ๋๋ค.
์บ๋ฆญํฐ๊ฐ ์ฌ๋ง ์ํ์ผ ๊ฒฝ์ฐ ์ด ๊ฐ์ ๊ฐ์ ๋ก 0์ผ๋ก ๊ณ ์ ๋๋ฉฐ, ์ฒด๋ ฅ์ ๊ฐ์์ํฌ ๋๋ ์์ฑ์ ์ง์ ๋ณ๊ฒฝํ๊ธฐ๋ณด๋ค๋ TakeDamage() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ๊ถ์ฅ๋ฉ๋๋ค.
์ฒด๋ ฅ์ด 0์ ๋๋ฌํ๋ฉด ํด๋จธ๋
ธ์ด๋๋ ์๋์ผ๋ก Dead ์ํ๋ก ์ ํ๋๋ฉฐ, ChangeState() ๋ฉ์๋๋ฅผ ํตํด Dead
์ํ๋ก ๋ณ๊ฒฝ๋๋ ๊ฒฝ์ฐ์๋ Health ๊ฐ์ 0์ผ๋ก ์ค์ ๋ฉ๋๋ค.
Code Samples
Humanoid.Health = 0
HealthDisplayDistance
number
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
HipHeight
number
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
Jump
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
JumpHeight
number
์ด ์์ฑ์ ํด๋จธ๋ ธ์ด๋๊ฐ ์ ํํ์ ๋ ๋๋ฌํ ์ ์๋ ์ต๋ ๋์ด๋ฅผ cm ๋จ์๋ก ๊ฒฐ์ ํฉ๋๋ค.
๊ธฐ๋ณธ๊ฐ์ 81.639์ ๋๋ค.
์ด ์์ฑ์ 0์ผ๋ก ์ค์ ํ๋ฉด ํด๋จธ๋ ธ์ด๋๋ ์ ํํ ์ ์๊ฒ ๋์ง๋ง, ์ ํ๋ฅผ ์์ ํ ์ ํํ๋ ค๋ฉด ๊ฐ์ ๋ณ๊ฒฝํ๊ธฐ๋ณด๋ค๋ Humanoid:SetStateEnabled() ๋ฉ์๋๋ฅผ ์ฌ์ฉํด Jumping ์ํ๋ฅผ ๋นํ์ฑํํ๋ ๊ฒ์ด ๊ถ์ฅ๋ฉ๋๋ค.
Code Samples
JumpPower
number
ํด๋จธ๋ ธ์ด๋๊ฐ ์ ํํ ๋ ์๋ก ๊ฐํด์ง๋ ํ์ ํฌ๊ธฐ๋ฅผ ์ ์ํ๋ ์์ฑ์ ๋๋ค.
๊ธฐ๋ณธ๊ฐ์ 400์ด๋ฉฐ, ์ค์ ์ ํ ๋์ด๋ Workspace.Gravity์ ์ค์ ๋ ์ค๋ ฅ ๊ฐ์ ์ํฅ์ ํจ๊ป ๋ฐ์ต๋๋ค.
์ด ์์ฑ์ 0์ผ๋ก ์ค์ ํ๋ฉด ํด๋จธ๋ ธ์ด๋๋ ์ ํํ ์ ์๊ฒ ๋์ง๋ง, ์ ํ๋ฅผ ์์ ํ ์ ํํ๋ ค๋ฉด ๊ฐ์ ๋ณ๊ฒฝํ๊ธฐ๋ณด๋ค๋ Humanoid:SetStateEnabled() ๋ฉ์๋๋ฅผ ์ฌ์ฉํด Jumping ์ํ๋ฅผ ๋นํ์ฑํํ๋ ๊ฒ์ด ๊ถ์ฅ๋ฉ๋๋ค.
Code Samples
Humanoid.JumpPower = 1000
MaxHealth
number
ํด๋จธ๋ ธ์ด๋ ์ต๋ ์ฒด๋ ฅ์ ์ง์ ํ๋ ์์ฑ์ ๋๋ค.
Code Samples
print(Humanoid.MaxHealth)
MaxSlopeAngle
number
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
MoveDirection
Vector3
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
PlatformStand
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
RootPart
BasePart
ํด๋จธ๋ ธ์ด๋์ ์ค์ฌ ํํธ์ธ HumanoidRootPart๋ฅผ ๊ฐ๋ฆฌํค๋ ์์ฑ์ ๋๋ค. (์ฝ๊ธฐ ์ ์ฉ)
์ด ํํธ๋ ์บ๋ฆญํฐ๊ฐ 3D ๊ณต๊ฐ์์ ๊ฑท๊ฑฐ๋ ๋ฐ๋ ๋์์ ์ ์ดํ๋ ๊ธฐ์ค์ ์ญํ ์ ํ๋ฉฐ, ์ผ๋ฐ์ ์ผ๋ก ํ๋ฉด์๋ ๋ณด์ด์ง ์์ต๋๋ค.
Code Samples
print(Humanoid.RootPart)
Sit
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
WalkSpeed
number
์ด ์์ฑ์ ํด๋จธ๋ ธ์ด๋๊ฐ ์ด๋น ์ด๋ํ ์ ์๋ ์๋๋ฅผ ์ ์ํ๋ฉฐ, ๊ธฐ๋ณธ๊ฐ์ 500์ ๋๋ค.
๋ชจ๋ฐ์ผ ํ๊ฒฝ์์๋ Studio์์ ํค๋ณด๋๋ก ์กฐ์ํ ๋์ ๋ฌ๋ฆฌ ์กฐ์ด์คํฑ์ ๋๊น์ง ๊ธฐ์ธ์ด์ง ์์ผ๋ฉด ์ค์ ์ด๋ ์๋๊ฐ WalkSpeed ๊ฐ๋ณด๋ค ๋ฎ๊ฒ ์ ์ฉ๋ ์ ์์ต๋๋ค.
์ด ๊ฐ์ 0์ผ๋ก ์ง์ ํ๋ฉด ์บ๋ฆญํฐ๋ ์์ง์ด์ง ๋ชปํ๊ฒ ๊ณ ์ ๋๋ฉฐ, ํ๋ ์ด์ด ์ ๋ ฅ ์ญ์ ๋ฌดํจํ๋ฉ๋๋ค.
๋ํ ์ค๋ฒ๋ฐ์ด์ ๊ธฐ๋ณธ ์ ๋๋ฉ์ด์ ์คํฌ๋ฆฝํธ๋ ์บ๋ฆญํฐ์ ์ค์ ์ด๋ ์๋์ ๋ง์ถ์ด ๊ฑท๊ธฐ์ ๋ฌ๋ฆฌ๊ธฐ ์ ๋๋ฉ์ด์ ์ ์ฌ์ ์๋๋ฅผ ์๋์ผ๋ก ์กฐ์ ํฉ๋๋ค.
Code Samples
HHmanoid.WalkSpeed = 4000
WalkToPoint
Vector3
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
HitboxType
Enum.HitboxType
ํด๋จธ๋ ธ์ด๋์ ํผ๊ฒฉ ํ์ ๋ฐฉ์์ ์ ์ํ๋ ์์ฑ์ ๋๋ค.
๊ธฐ๋ณธ๊ฐ์ Single๋ก, ์บ๋ฆญํฐ ์ ์ฒด๋ฅผ ํ๋์ ์บก์ ํํ ํํธ๋ฐ์ค๋ก ๊ฐ์ธ๋ฉฐ ๋ถ์๋ณ ํผ๊ฒฉ ํ์ ์ ์ง์ํ์ง ์์ต๋๋ค.
SixBody ๋๋ FittedSixBody๋ก ์ค์ ํ๋ฉด ๋จธ๋ฆฌ, ๋ชธํต, ํ, ๋ค๋ฆฌ ๋ฑ ์ฃผ์ ์ ์ฒด ๋ถ์์ ๊ณ ์ ๋ ํํธ๋ฐ์ค๊ฐ ์์ฑ๋์ด ๋ถ์๋ณ ํ์ ์ด ๊ฐ๋ฅํ๋ฉฐ, ํนํ FittedSixBody๋ ์บ๋ฆญํฐ์ ์ธํ๊ณผ ์ฐฉ์ฉํ ์์์ ๋ง์ถ์ด ํํธ๋ฐ์ค๊ฐ ์ธ๋ฐํ๊ฒ ์กฐ์ ๋ฉ๋๋ค.
์ด ๊ฐ์ Workspace์์ ์ฌ์ ์ ๊ตฌ์ฑํด์ผ ํ๋ฉฐ, ๊ฒ์ ์คํ ์ค์๋ ๋ฐํ์์์ ์์ ํ ์ ์์ต๋๋ค. ๋ฐ๋ผ์ ํด๋น ์์ฑ์ ๋ฐ๋์ ์คํ๋์ค ํธ์ง ๋จ๊ณ์์ ๋ฏธ๋ฆฌ ์ค์ ํด์ผ ํฉ๋๋ค.
Code Samples
print(Humanoid.HitBoxType)
LookCameraDirection
bool
์นด๋ฉ๋ผ๊ฐ ํด๋จธ๋ ธ์ด๋ ์บ๋ฆญํฐ์ ๋ฐ๋ผ๋ณด๋ ๋ฐฉํฅ์ ๋ฐ๋ผ๊ฐ๋๋ก ํ ์ง ์ฌ๋ถ๋ฅผ ์ง์ ํ๋ ์์ฑ์ ๋๋ค.
์ด ์์ฑ ๋์ UserGameSettings.RotationType์ ์ฌ์ฉํ๋ ๊ฒ์ด ๊ถ์ฅ๋ฉ๋๋ค.
Code Samples
Humanoid.LookCameraDirection = true
DefaultBlendSpace
BlendSpace
Code Samples
Humanoid.DefaultBlendSpace = BasicBlendSpace
BlendSpace
BlendSpace
์ฌ์ฉํ ๋ธ๋ ๋์คํ์ด์ค๋ฅผ ์ง์ ํ๋ ์์ฑ์ ๋๋ค.
๋ธ๋ ๋์คํ์ด์ค๋ ์บ๋ฆญํฐ์ ์๋๋ ์ด๋ ๋ฐฉํฅ๊ณผ ๊ฐ์ ๋งค๊ฐ๋ณ์๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ฌ๋ฌ ์ ๋๋ฉ์ด์ ์ ๋ณด๊ฐํ์ฌ, ์ํฉ์ ๋ง๊ฒ ๋ถ๋๋ฝ๊ฒ ์ ํ๋๊ณ ํผํฉ๋ ์ ๋๋ฉ์ด์ ์ ์ฌ์ํ๋ ๊ธฐ๋ฅ์ ๋๋ค.
Code Samples
Humanoid.BlendSpace = BasicBlendSpace
Methods
AddAccessory
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Instance
InAccessory
Return
void
Code Samples
ApplyDescription
์ ๋ ฅ๋ HumanoidDescription ์ ๋ณด์ ๋ง๊ฒ ์บ๋ฆญํฐ์ ์ธํ์ ๋ณ๊ฒฝํฉ๋๋ค.
HumanoidDescription ๊ฐ์ฒด๋ ๋ณต์ฌ๋ ๋ค ํด๋จธ๋ ธ์ด๋์ ์ ์ฅ๋์ด, ์ดํ ์บ๋ฆญํฐ์ ์ธํ ์ ์๋ก ํ์ฉ๋ฉ๋๋ค.
Parameters
HumanoidDescription
InDescription
์ค์ ํ ์ธํ ์ ๋ณด์ ๋๋ค.
Enum.AssetTypeVerification
InAssetTypeVerification
์ธํ ์ ๋ณด์ ํฌํจ๋ ์์ ์ ์ด๋ค ๋ฐฉ์์ผ๋ก ๊ฒ์ฆํ ์ง ์ง์ ํ๋ ์์ฑ์ ๋๋ค. (ํ์ฌ๋ Default ๊ฐ๋ง ์ง์๋ฉ๋๋ค)
Return
void
Code Samples
local Workspace = game:GetService("Workspace")
local HumanoidDescription = Workspace:WaitForChild("HumanoidDescription")
Humanoid:ApplyDescription(HumanoidDescription, Enum.AssetTypeVerification.Default)
ApplyDescriptionReset
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
HumanoidDescription
InDescription
Enum.AssetTypeVerification
InAssetTypeVerification
Return
void
Code Samples
EquipTool
ํด๋จธ๋ ธ์ด๋๊ฐ ์ง์ ๋ Tool์ ์ฅ์ฐฉํ๋๋ก ํฉ๋๋ค.
์ด๋ฏธ ๋ค๋ฅธ ๋๊ตฌ๋ฅผ ์ฅ์ฐฉ ์ค์ด๋ผ๋ฉด ๋จผ์ ํด์ ํ ๋ค, ์๋ก ์ ๋ฌ๋ ๋๊ตฌ๋ฅผ ์ฅ์ฐฉํฉ๋๋ค.
Parameters
Instance
InTool
์ฅ์ฐฉํ Tool์ ๋๋ค.
Return
void
Code Samples
Humanoid:EquipTool(Tool)
GetAccessories
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Return
Tuple
Code Samples
GetAppliedDescription
ํด๋จธ๋ ธ์ด๋์ ์ ์ฉ๋ ์ธํ ์ ๋ณด(HumanoidDescription)๋ฅผ ๋ฐํํฉ๋๋ค.
๋ฐํ๋ ๊ฐ์ฒด๋ฅผ ํตํด ํ์ฌ ์บ๋ฆญํฐ์ ์ธํ ๊ตฌ์ฑ์ ํ์ธํ ์ ์์ผ๋ฉฐ, ํ์ํ ๊ฒฝ์ฐ ApplyDescription() ๋ฉ์๋๋ฅผ ์ฌ์ฉํด ๋์ผํ ์ธํ์ ๋ค๋ฅธ ์บ๋ฆญํฐ์ ์ ์ฉํ ์๋ ์์ต๋๋ค.
์ธํ ์ ๋ณด๊ฐ ์ค์ ๋์ด ์์ง ์์ ๊ฒฝ์ฐ nil์ ๋ฐํํฉ๋๋ค.
Parameters
Return
HumanoidDescription
์ค์ ๋ ์ธํ ์ ๋ณด๋ฅผ ๋ฐํํฉ๋๋ค.
Code Samples
local Description = Humanoid:GetAppliedDescription()
UnequipTools
ํด๋จธ๋ ธ์ด๋๊ฐ ํ์ฌ ์ฅ์ฐฉํ๊ณ ์๋ ๋ชจ๋ Tool์ ํด์ ํฉ๋๋ค.
Parameters
Return
void
Code Samples
Humanoid:UnequipTools()
RemoveAccessories
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Return
void
Code Samples
TakeDamage
ํด๋จธ๋ ธ์ด๋์ ์ฒด๋ ฅ์ ์ง์ ํ ๊ฐ๋งํผ ๊ฐ์์ํค๋ฉฐ, ์์ ๊ฐ์ ์ ๋ฌํ๋ฉด ์ฒด๋ ฅ์ด ํ๋ณต๋ฉ๋๋ค.
Parameters
number
InDamage
์ฒด๋ ฅ์ ์ ์ฉํ ๊ฐ์ผ๋ก, ์์๋ ์ฒด๋ ฅ์ ์ค์ด๊ณ ์์๋ ์ฒด๋ ฅ์ ํ๋ณต์ํต๋๋ค.
Return
void
Code Samples
Humanoid:TakeDamage(100)
LoadAnimation
(deprecated) ํด๋จธ๋ ธ์ด๋์ ํน์ ์ ๋๋ฉ์ด์ ์ ๋ถ๋ฌ์ ์ ์ฉํ๊ณ , ์ฌ์ ๋ฐ ์ ์ดํ ์ ์๋๋ก AnimationTrack ๊ฐ์ฒด๋ฅผ ๋ฐํํฉ๋๋ค.
์ด ๋ฉ์๋๋ ๋ ์ด์ ๊ถ์ฅ๋์ง ์์ผ๋ฉฐ, ๋์ Animator:LoadAnimation()์ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
Parameters
Animation
InAnimation
์ฌ์ฉํ ์ ๋๋ฉ์ด์ ์ ๋๋ค.
Return
AnimationTrack
๋ฐํ๋ ์ ๋๋ฉ์ด์ ํธ๋์ ๋๋ค.
Code Samples
local Animation = Instance.new("Animation")
Animation.AnimationId = "ovdrassetid://18850100" -- WinAnimation01
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
ChangeState
ํด๋จธ๋ ธ์ด๋์ ์ํ๋ฅผ ์ง์ ๋ HumanoidStateType ๊ฐ์ผ๋ก ์ ํํ์ฌ ํ์ฌ ์ํ ์ค์ธ ๋์์ ๋ณ๊ฒฝํฉ๋๋ค.
๋ค๋ง ํด๋จธ๋ ธ์ด๋์ ๋์ ํน์ฑ์ ์ผ๋ถ ์ํ๋ ๋ฐ์๋์ง ์์ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ๊ณต์ค์ ์์ ๋ Landed ์ํ๋ก ์ค์ ํ๋ฉด ์ ์ฉ๋์ง ์์ต๋๋ค.
์ํ ๋ณ๊ฒฝ์ LocalScript์์ ์ฒ๋ฆฌํด์ผ ํฉ๋๋ค.
Parameters
Enum.HumanoidStateType
StateType
๋ณ๊ฒฝํ ์ํ์ ๋๋ค.
Return
void
Code Samples
Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
SetStateEnabled
ํด๋จธ๋ ธ์ด๋๊ฐ ์ง์ ๋ HumanoidStateType ์ํ์ ์ง์ ํ ์ ์๋์ง๋ฅผ ์ ์ดํฉ๋๋ค.
ํน์ ์ํ๋ฅผ ๋นํ์ฑํํ๋ฉด ์คํฌ๋ฆฝํธ์์ ChangeState()๋ฅผ ํธ์ถํ๊ฑฐ๋ ์กฐ๊ฑด์ด ์ถฉ์กฑ๋๋๋ผ๋ ํด๋น ์ํ๋ก ์ ํ๋์ง ์์ต๋๋ค.
์ฃผ๋ก ์ ํ๋ฅผ ๋ง๊ฑฐ๋ Climb ์ํ๋ฅผ ๋นํ์ฑํํ๋ ๋ฐ ํ์ฉ๋๋ฉฐ, Running๊ณผ ๊ฐ์ด ์ผ๋ถ ์ํ๋ ์ด ๋ฉ์๋๋ก ์ ์ดํ ์ ์์ต๋๋ค.
Parameters
Enum.HumanoidStateType
InHumanoidStateType
ํ์ฑํ ์ฌ๋ถ๋ฅผ ์ค์ ํ ์ํ์ ๋๋ค.
bool
bInEnabled
ํ์ฑํ ์ฌ๋ถ์ ๋๋ค.
Return
void
Code Samples
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)
GetState
ํด๋จธ๋ ธ์ด๋๊ฐ ํ์ฌ ์ด๋ค ํ๋ ์ํ์ ์๋์ง๋ฅผ HumanoidStateType ๊ฐ์ผ๋ก ๋ฐํํ๋ฉฐ, ์ด๋ฅผ ํตํด ์บ๋ฆญํฐ๊ฐ ์ ํ, ๋ํ, ๋ฌ๋ฆฌ๊ธฐ ๋ฑ ์ด๋ค ํ๋์ ์ํ ์ค์ธ์ง ํ์ธํ ์ ์์ต๋๋ค.
Parameters
Return
Enum.HumanoidStateType
ํด๋จธ๋ ธ์ด๋์ ํ์ฌ ์ํ๋ฅผ ๋ฐํํฉ๋๋ค.
Code Samples
print(Humanoid:GetState())
Events
ApplyDescriptionFinished
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
Climbing
ํด๋จธ๋ ธ์ด๋๊ฐ Climb ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
Parameters
Code Samples
local function OnClimbing()
print("Climbing!")
end
Humanoid.Climbing:Connect(OnClimbing)
ClusterCompositionFinished
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
Died
ํด๋จธ๋ ธ์ด๋๊ฐ Dead ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ๋ก, ๋ณดํต ์ฒด๋ ฅ์ด 0์ด ๋์์ ๋ ๋ฐ์ํฉ๋๋ค.
Parameters
Code Samples
local function OnDied()
print("Die!")
end
Humanoid.Died:Connect(OnDied)
EmoteTriggered
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
FallingDown
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
FreeFalling
ํด๋จธ๋ ธ์ด๋๊ฐ Freefall ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ๋ก, ๋ณดํต ๊ณต์ค์์ ๋ํํ ๋ ๋ฐ์ํฉ๋๋ค.
Parameters
Code Samples
local function OnFreeFalling()
print("FreeFalling!")
end
Humanoid.FreeFalling:Connect(OnFreeFalling)
GettingUp
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
HealthChanged
ํด๋จธ๋
ธ์ด๋์ ์ฒด๋ ฅ์ด ๋ณ๊ฒฝ๋ ๋๋ง๋ค ์คํ๋๋ ์ด๋ฒคํธ๋ก, ์ฒด๋ ฅ์ด 0์ด ๋์ด Dead
์ํ๋ก ์ ํ๋ ๋๋ ํธ์ถ๋ฉ๋๋ค.
Parameters
number
Health
๋ณ๊ฒฝ๋ ์ฒด๋ ฅ์ ๋๋ค.
Code Samples
local function OnHealthChanged(health)
print("HealthChanged!", health)
end
Humanoid.HealthChanged:Connect(OnHealthChanged)
Jumping
ํด๋จธ๋ ธ์ด๋๊ฐ Jumping ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
Parameters
Code Samples
local function OnJumping()
print("Jumping!")
end
Humanoid.Jumping:Connect(OnJumping)
MoveToFinished
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
PlatformStanding
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
Running
ํด๋จธ๋ ธ์ด๋๊ฐ Running ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
Parameters
Code Samples
local function OnRunning()
print("Running!")
end
Humanoid.Running:Connect(OnRunning)
StateChanged
ํด๋จธ๋ ธ์ด๋๊ฐ ๋ค๋ฅธ ๋์ ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
๋จ, ๋ณ๋์ ๋๊ธฐ(idle) ์ํ๋ ์กด์ฌํ์ง ์์ผ๋ฏ๋ก, ์บ๋ฆญํฐ๊ฐ ์ ์งํ๋์ง๋ฅผ ํ์ธํ๋ ค๋ฉด RootPart์ ์๋(AssemblyLinearVelocity)๋ฅผ ์ง์ ํ์ธํด์ผ ํฉ๋๋ค.
Parameters
Enum.HumanoidStateType
PreviousState
๋ณ๊ฒฝ ์ ์ํ์ ๋๋ค.
Enum.HumanoidStateType
CurrentState
๋ณ๊ฒฝ๋ ์ํ์ ๋๋ค.
Code Samples
local function OnStateChanged(prevState, newState)
print("StateChanged!", prevState, "->", newState)
end
Humanoid.StateChanged:Connect(OnStateChanged)
StateEnabledChanged
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
Swimming
ํด๋จธ๋ ธ์ด๋๊ฐ Swimming ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
Parameters
Code Samples
local function OnSwimming()
print("Swimming!")
end
Humanoid.Swimming:Connect(OnSwimming)
Touched
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
Landed
ํด๋จธ๋ ธ์ด๋๊ฐ Landed ์ํ๋ก ์ ํ๋ ๋ ์คํ๋๋ ์ด๋ฒคํธ์ ๋๋ค.
Parameters
Code Samples
local function OnLanded()
print("Landed!")
end
Humanoid.Landed:Connect(Landed)
PlatformStandingMoving
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Parameters
Code Samples
See also
์บ๋ฆญํฐLast updated