배우기
엔진 클래스
Instance
만들 수 없음
찾아볼 수 없음

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


요약
메서드
AddTag(tag: string):()
children():Instances
사용되지 않음
clone():Instance
사용되지 않음
Destroy():()
destroy():()
사용되지 않음
findFirstChild(name: string,recursive: boolean):Instance
사용되지 않음
GetAttribute(attribute: string):Variant
GetChildren():Instances
getChildren():Instances
사용되지 않음
GetDebugId(scopeLength: number):string
GetDescendants():Instances
GetStyled(name: string,selector: string?):Variant
isDescendantOf(ancestor: Instance):boolean
사용되지 않음
QueryDescendants(selector: string):Instances
Remove():()
사용되지 않음
remove():()
사용되지 않음
RemoveTag(tag: string):()
SetAttribute(attribute: string,value: Variant):()
WaitForChild(childName: string,timeOut: number):Instance
상속된 멤버

API 참조
속성
Archivable
병렬 읽기
Instance.Archivable:boolean

archivable
사용되지 않음

Capabilities
병렬 읽기
기능: CapabilityControl
Instance.Capabilities:SecurityCapabilities

Name
병렬 읽기
Instance.Name:string

Parent
복제되지 않음
병렬 읽기
Instance.Parent:Instance

PredictionMode
읽기 전용
복제되지 않음
스크립팅할 수 없음
병렬 읽기
Instance.PredictionMode:Enum.PredictionMode

RobloxLocked
사용되지 않음

Sandboxed
복제되지 않음
병렬 읽기
기능: CapabilityControl
Instance.Sandboxed:boolean

UniqueId
복제되지 않음
Roblox 스크립트 보안
Roblox 보안
병렬 읽기
Instance.UniqueId:UniqueId

메서드
AddTag
Instance:AddTag(tag:string):()
매개 변수
tag:string
반환
()

children
사용되지 않음

ClearAllChildren
Instance:ClearAllChildren():()
반환
()

Clone
기능: CreateInstances
시뮬레이션 액세스
Instance:Clone():Instance
반환
코드 샘플
인스턴스 복제
local Workspace = game:GetService("Workspace")
-- 기존 객체에 대한 참조 가져오기
local model = script.Parent.Model
-- 모델의 복제본 만들기
local clone = model:Clone()
-- 복제본이 원본 모델과 겹치지 않도록 이동하기
clone:PivotTo(model.PrimaryPart.CFrame - (Vector3.xAxis * 10))
-- 복제본을 Workspace에 추가하기
clone.Parent = Workspace

clone
사용되지 않음

Destroy
Instance:Destroy():()
반환
()
코드 샘플
인스턴스:Destroy()
local part = script.Parent.Part
part:Destroy()

destroy
사용되지 않음

FindFirstAncestor
병렬 쓰기
Instance:FindFirstAncestor(name:string):Instance?
매개 변수
name:string
반환

FindFirstAncestorOfClass
병렬 쓰기
Instance:FindFirstAncestorOfClass(className:string):Instance?
매개 변수
className:string
반환

FindFirstAncestorWhichIsA
병렬 쓰기
Instance:FindFirstAncestorWhichIsA(className:string):Instance?
매개 변수
className:string
반환

FindFirstChild
병렬 쓰기
시뮬레이션 액세스
Instance:FindFirstChild(
name:string, recursive:boolean
매개 변수
name:string
recursive:boolean
기본값: false
반환
코드 샘플
인스턴스:첫 번째 자식 찾기
local found = workspace:FindFirstChild("Brick")
if found then
found.Name = "Foo"
end

findFirstChild
사용되지 않음

FindFirstChildOfClass
병렬 쓰기
Instance:FindFirstChildOfClass(className:string):Instance?
매개 변수
className:string
반환
코드 샘플
인스턴스:클래스의첫번째자식찾기
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid
while not humanoid do
humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then
character.ChildAdded:Wait()
end
end

FindFirstChildWhichIsA
병렬 쓰기
시뮬레이션 액세스
Instance:FindFirstChildWhichIsA(
className:string, recursive:boolean
매개 변수
className:string
recursive:boolean
기본값: false
반환

FindFirstDescendant
병렬 쓰기
Instance:FindFirstDescendant(name:string):Instance?
매개 변수
name:string
반환

GetActor
병렬 쓰기
Instance:GetActor():Actor?
반환

GetAttribute
병렬 쓰기
시뮬레이션 액세스
Instance:GetAttribute(attribute:string):Variant
매개 변수
attribute:string
반환
Variant

GetAttributeChangedSignal
Instance:GetAttributeChangedSignal(attribute:string):RBXScriptSignal
매개 변수
attribute:string

GetAttributes
병렬 쓰기
시뮬레이션 액세스
Instance:GetAttributes():Dictionary

GetChildren
병렬 쓰기
시뮬레이션 액세스
Instance:GetChildren():Instances
반환
Instances
코드 샘플
인스턴스:GetChildren
local children = workspace:GetChildren()
for i = 1, #children do
print(i, children[i].Name)
end

getChildren
사용되지 않음

GetDebugId
찾아볼 수 없음
플러그인 보안
Instance:GetDebugId(scopeLength:number):string
매개 변수
scopeLength:number
기본값: 4
반환
코드 샘플
인스턴스:디버그 아이디 가져오기
print(workspace:GetDebugId()) --> 39FA_12
print(workspace:GetDebugId(10)) --> 39FA2FEF4D_12
print(workspace:GetDebugId(math.huge)) --> 12

GetDescendants
병렬 쓰기
시뮬레이션 액세스
Instance:GetDescendants():Instances
반환
Instances
코드 샘플
Instance:GetDescendants
local descendants = workspace:GetDescendants()
-- 작업 공간의 모든 자손을 반복합니다. 만약
-- BasePart가 발견되면, 코드는 해당 부품의 색상을 녹색으로 변경합니다.
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.BrickColor = BrickColor.Green()
end
end

GetFullName
병렬 쓰기
시뮬레이션 액세스
Instance:GetFullName():string
반환
코드 샘플
인스턴스:전체이름가져오기
-- 간단한 계층 구조 생성
local model = Instance.new("Model")
local part = Instance.new("Part")
part.Parent = model
local fire = Instance.new("Fire")
fire.Parent = part
print(fire:GetFullName()) --> Model.Part.Fire
model.Parent = workspace
print(fire:GetFullName()) --> Workspace.Model.Part.Fire
part.Name = "안녕, 세상"
print(fire:GetFullName()) --> Workspace.Model.안녕, 세상.Fire
Instance:GetFullName Lua 구현
local function getFullName(object)
local result = object.Name
object = object.Parent
while object and object ~= game do
-- 부모 이름 추가하기
result = object.Name .. "." .. result
-- 계층 구조 위로 이동하기
object = object.Parent
end
return result
end
print(getFullName(workspace.Camera)) --> Workspace.Camera

GetStyled
Instance:GetStyled(
name:string, selector:string?
):Variant
매개 변수
name:string
selector:string?
반환
Variant

GetStyledPropertyChangedSignal
Instance:GetStyledPropertyChangedSignal(property:string):RBXScriptSignal
매개 변수
property:string

GetTags
병렬 쓰기
시뮬레이션 액세스
Instance:GetTags():{any}
반환

HasTag
병렬 쓰기
시뮬레이션 액세스
Instance:HasTag(tag:string):boolean
매개 변수
tag:string
반환

IsAncestorOf
병렬 쓰기
시뮬레이션 액세스
Instance:IsAncestorOf(descendant:Instance):boolean
매개 변수
descendant:Instance
반환
코드 샘플
Instance:IsAncestorOf()
local Workspace = game:GetService("Workspace")
local spawnLocation = Workspace.SpawnLocation
local decal = spawnLocation.Decal
-- 이 문장은 참입니다
print(Workspace:IsAncestorOf(spawnLocation))
print(Workspace:IsAncestorOf(decal))
print(spawnLocation:IsAncestorOf(decal))
-- 이 문장은 거짓입니다
print(spawnLocation:IsAncestorOf(Workspace))
print(decal:IsAncestorOf(Workspace))
print(decal:IsAncestorOf(spawnLocation))

IsDescendantOf
병렬 쓰기
시뮬레이션 액세스
Instance:IsDescendantOf(ancestor:Instance):boolean
매개 변수
ancestor:Instance
반환
코드 샘플
인스턴스:IsDescendantOf
local part = Instance.new("Part")
print(part:IsDescendantOf(game))
--> false
part.Parent = workspace
print(part:IsDescendantOf(game))
--> true
part.Parent = game
print(part:IsDescendantOf(game))
--> true

isDescendantOf
사용되지 않음

IsPropertyModified
시뮬레이션 액세스
Instance:IsPropertyModified(property:string):boolean
매개 변수
property:string
반환

QueryDescendants
시뮬레이션 액세스
Instance:QueryDescendants(selector:string):Instances
매개 변수
selector:string
반환
Instances

Remove
사용되지 않음

remove
사용되지 않음

RemoveTag
Instance:RemoveTag(tag:string):()
매개 변수
tag:string
반환
()

ResetPropertyToDefault
Instance:ResetPropertyToDefault(property:string):()
매개 변수
property:string
반환
()

SetAttribute
시뮬레이션 액세스
Instance:SetAttribute(
attribute:string, value:Variant
):()
매개 변수
attribute:string
value:Variant
반환
()

WaitForChild
생성할 수 있음
Instance:WaitForChild(
childName:string, timeOut:number
매개 변수
childName:string
timeOut:number
반환
코드 샘플
인스턴스:WaitForChild
local part = workspace:WaitForChild("Part")
print(part.Name .. "가 Workspace에 추가되었습니다.")

이벤트
AncestryChanged
Instance.AncestryChanged(
child:Instance, parent:Instance
매개 변수
child:Instance
parent:Instance
코드 샘플
인스턴스.조상변경됨
local Workspace = game:GetService("Workspace")
local redPart = script.Parent.RedPart
local bluePart = script.Parent.BluePart
local changingPart = script.Parent.ChangingPart
-- changingPart의 부모에 따라 색상을 변경합니다
local function onAncestryChanged(part: Part, parent: Instance)
if parent == redPart then
changingPart.Color = Color3.new(1, 0, 0)
elseif parent == bluePart then
changingPart.Color = Color3.new(0, 0, 1)
else
changingPart.Color = Color3.new(1, 1, 1)
end
print(`{part.Name}의 부모가 이제 {parent.Name}입니다.`)
end
changingPart.AncestryChanged:Connect(onAncestryChanged)
-- changingPart의 Parent 속성을 시간이 지나면서 다른 인스턴스로 설정합니다
while true do
task.wait(2)
changingPart.Parent = redPart
task.wait(2)
changingPart.Parent = bluePart
task.wait(2)
changingPart.Parent = Workspace
end

AttributeChanged
Instance.AttributeChanged(attribute:string):RBXScriptSignal
매개 변수
attribute:string

ChildAdded
Instance.ChildAdded(child:Instance):RBXScriptSignal
매개 변수
child:Instance
코드 샘플
Instance.ChildAdded
local function onChildAdded(instance)
print(instance.Name .. " 작업 공간에 추가됨")
end
workspace.ChildAdded:Connect(onChildAdded)
local part = Instance.new("Part")
part.Parent = workspace --> Part가 작업 공간에 추가됨

childAdded
사용되지 않음

ChildRemoved
Instance.ChildRemoved(child:Instance):RBXScriptSignal
매개 변수
child:Instance
코드 샘플
인스턴스.자식제거됨
local function onChildRemoved(instance)
print(instance.Name .. " 작업공간에서 제거됨")
end
workspace.ChildRemoved:Connect(onChildRemoved)
local part = Instance.new("Part")
part.Parent = workspace
task.wait(2)
part:Destroy()

DescendantAdded
Instance.DescendantAdded(descendant:Instance):RBXScriptSignal
매개 변수
descendant:Instance
코드 샘플
인스턴스.자식추가됨
local function onDescendantAdded(descendant)
print(descendant)
end
workspace.DescendantAdded:Connect(onDescendantAdded)
local part = Instance.new("Part")
part.Parent = workspace

DescendantRemoving
Instance.DescendantRemoving(descendant:Instance):RBXScriptSignal
매개 변수
descendant:Instance
코드 샘플
인스턴스.하위항목제거
workspace.DescendantRemoving:Connect(function(descendant)
print(descendant.Name .. "는 현재 " .. tostring(descendant.Parent) .. "에 있습니다.")
end)
local part = Instance.new("Part")
part.Parent = workspace
part.Parent = nil
--> Part는 현재 Workspace에 있습니다.
print(part.Parent)
--> nil

Destroying
Instance.Destroying():RBXScriptSignal
코드 샘플
파괴 이벤트 사용하기 (즉시 신호)
local part = Instance.new("Part", workspace)
local function onPartDestroying()
print("대기 전에:", part:GetFullName(), #part:GetChildren())
task.wait()
print("대기 후:", part:GetFullName(), #part:GetChildren())
end
part.Destroying:Connect(onPartDestroying)
part:Destroy()
파괴 이벤트 사용 (지연 신호)
local part = Instance.new("Part", workspace)
local function onPartDestroying()
print("신호 중:", part:GetFullName(), #part:GetChildren())
end
part.Destroying:Connect(onPartDestroying)
print("파괴 전:", part:GetFullName(), #part:GetChildren())
part:Destroy()
print("파괴 후:", part:GetFullName(), #part:GetChildren())

StyledPropertiesChanged
Instance.StyledPropertiesChanged():RBXScriptSignal

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