> For the complete documentation index, see [llms.txt](https://ditoland-utplus.gitbook.io/ditoland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object.md).

# Object

## **속성**

<br>

| **Parent** |
| ---------- |

부모 객체를 얻을 수 있어요.

\-- 샘플 --

```lua
local parent = Workspace.Floor.Parent --오브젝트의 부모를 반환해요
print(parent.Name)
```

<br>

| **Name** |
| -------- |

객체의 이름입니다.

\-- 샘플 --

```lua
local cube = Workspace.Cube
cube.Name = "ChangeName"
print(cube.Name)
```

## **함수**

<br>

| **void ConnectChangeEventFunction(string ValueName, function TargetFunction)** |
| ------------------------------------------------------------------------------ |

추가된 값이 변경 될 때 호출되는 이벤트에요. (Value 이름, 연결 함수)

\-- 샘플 --

```lua
local cube = Workspace.Cube
cube.SomeValue = 0

local function ChangeSomeValue(self, value) --ConnectChangeEventFunction로 연결된 함수는 self, value 인자가 고정적으로 들어가요.
   print(self.Name .. " Change Value : " .. value)
end
cube:ConnectChangeEventFunction("SomeValue", ChangeSomeValue)  --오브젝트의 "SomeValue" 라는 Value가 변경되면 ChangeSomeValue 함수를 호출해요.

wait(1)
cube.SomeValue = 1
```

<br>

| **Object GetChild(string ChildName)** |
| ------------------------------------- |

이름으로 자식 객체를 얻을 수 있어요. (찾고싶은 자식 객체 이름)

<br>

| **ObjectList GetChildList()** |
| ----------------------------- |

자식 객체의 리스트를 얻을 수 있어요.

\-- 샘플 --

```lua
local objList = Workspace:GetChildList() --오브젝트의 자식 오브젝트를 리스트로 반환해요.

for i = 1, #objList do --리스트앞에 #을 붙여 리스트의 길이를 가져올 수 있어요.
    print(objList[i].Name)
end
```

<br>

| **bool IsCharacter()** |
| ---------------------- |

캐릭터인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsCharacter() == true then --오브젝트가 Character면 true를 반환해요.
    print(cube.Name .. " Is Character")
end
```

<br>

| **bool IsStaticMesh()** |
| ----------------------- |

스테틱 메시인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsStaticMesh() == true then --오브젝트가 StaticMesh면 true를 반환해요.
    print(cube.Name .. " Is StaticMesh")
end
```

<br>

| **bool IsFX()** |
| --------------- |

FX인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsFX() == true then --오브젝트가 FX면 true를 반환해요.
    print(cube.Name .. " Is FX")
end
```

<br>

| **bool IsSound()** |
| ------------------ |

Sound인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsSound() == true then --오브젝트가 Sound면 true를 반환해요.
    print(cube.Name .. " Is Sound")
end
```

<br>

| **bool IsPointLight()** |
| ----------------------- |

포인트 라이트인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsPointLight() == true then --오브젝트가 PointLight면 true를 반환해요.
    print(cube.Name .. " Is PointLight")
end
```

<br>

| **bool IsSpotLight()** |
| ---------------------- |

스포트 라이트인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsSpotLight() == true then --오브젝트가 SpotLight면 true를 반환해요.
    print(cube.Name .. " Is SpotLight")
end
```

<br>

| **bool IsSurfaceUI()** |
| ---------------------- |

서피스 UI인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsSurfaceUI() == true then --오브젝트가 SurfaceUI면 true를 반환해요.
    print(cube.Name .. " Is SurfaceUI")
end
```

<br>

| **bool IsScreenUI()** |
| --------------------- |

스크린 UI인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsScreenUI() == true then --오브젝트가 ScreenUI면 true를 반환해요.
    print(cube.Name .. " Is ScreenUI")
end
```

<br>

| **bool IsTouchUI()** |
| -------------------- |

터치 UI인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsTouchUI() == true then --오브젝트가 TouchUI면 true를 반환해요.
    print(cube.Name .. " Is TouchUI")
end
```

<br>

| **bool IsItem()** |
| ----------------- |

아이템인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsItem() == true then --오브젝트가 Item면 true를 반환해요.
    print(cube.Name .. " Is Item")
end
```

<br>

| **bool IsNPC()** |
| ---------------- |

NPC인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsNPC() == true then --오브젝트가 NPC면 true를 반환해요.
    print(cube.Name .. " Is NPC")
end
```

<br>

| **bool IsScript()** |
| ------------------- |

스트립트인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsScript() == true then --오브젝트가 Script면 true를 반환해요.
    print(cube.Name .. " Is Script")
end
```

<br>

| **bool IsCollider()** |
| --------------------- |

Collider인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsCollider() == true then --오브젝트가 Collider면 true를 반환해요.
    print(cube.Name .. " Is Collider")
end
```

<br>

| **bool IsWidget()** |
| ------------------- |

Widget인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsWidget() == true then --오브젝트가 Widget면 true를 반환해요.
    print(cube.Name .. " Is Widget")
end
```

<br>

| **bool IsCamera()** |
| ------------------- |

Camera인지 확인할 수 있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube
if cube:IsCamera() == true then --오브젝트가 Camera면 true를 반환해요.
    print(cube.Name .. " Is Camera")
end
```

<br>

| **bool IsValid()** |
| ------------------ |

해당 오브젝트가 유효한지 확인 할 수있어요.

\-- 샘플 --

```lua
local cube = Workspace.Cube

Game:DeleteObject(cube)
wait(1)

print(cube:IsValid()) --오브젝트가 파괴되면 false를 반환해요.
```

<br>

| **bool IsValidValue()** |
| ----------------------- |

해당 오브젝트의 값이 유효한지 확인할 수 있어요.

\-- 샘플 --

```lua
local checkObject = Workspace.Floor
local checkValue = "Cube"

if checkObject:IsValidValue(checkValue) == false then
    print(checkObject, " Have No ", checkValue)
else
    print(checkObject, ".", checkObject[checkValue])
end
```

<br>

| **void AddReplicateValue(string ValueName, Vector Data, ReplicateType Type, number Time)** |
| ------------------------------------------------------------------------------------------ |

해당 객체에 서버, 클라이언트 간 동기화가 가능한 벡터를 추가해요. (추가할 Value 이름, Vector 데이터, [Enum.ReplicateType.타입](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) , 동기화 시간)

\-- 샘플 --

```lua
--서버 스크립트에서-------------
Game:AddReplicateValue("SomeVector", Vector.new(0, 50, 0), Enum.ReplicateType.Changed, 0) --서버와 클라이언트간 동기화되는 값을 등록하고 초기값을 설정한뒤, 값이 변경될때마다 호출되게 해요.
print(Game.SomeVector)

--클라 스크립트에서-------------
print(Game.SomeVector) --서버에서 값이 바뀌었지만 클라에서도 동일하게 출력돼요.
```

<br>

| **void AddReplicateValue(string ValueName, number Data, ReplicateType Type, number Time)** |
| ------------------------------------------------------------------------------------------ |

해당 객체에 서버, 클라이언트 간 동기화가 가능한 실수를 추가해요. (추가할 Value 이름, number 데이터, [Enum.ReplicateType.타입](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) , 동기화 시간)

\-- 샘플 --

```lua
--서버 스크립트에서-------------
Game:AddReplicateValue("SomeNumber", 1, Enum.ReplicateType.Changed, 0) --서버와 클라이언트간 동기화되는 값을 등록하고 초기값을 설정한뒤, 값이 변경될때마다 호출되게 해요.
print(Game.SomeNumber .. " in Server")

--클라 스크립트에서-------------
print(Game.SomeNumber .. " in Client") --서버에서 값이 바뀌었지만 클라에서도 동일하게 출력돼요.
```

<br>

| **void AddReplicateValue(string ValueName, bool Data, ReplicateType Type, number Time)** |
| ---------------------------------------------------------------------------------------- |

해당 객체에 서버, 클라이언트 간 동기화가 가능한 bool를 추가해요. (추가할 Value 이름, bool 데이터, [Enum.ReplicateType.타입](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) , 동기화 시간)

\-- 샘플 --

```lua
--서버 스크립트에서-------------
Game:AddReplicateValue("SomeBool", true, Enum.ReplicateType.Changed, 0) --서버와 클라이언트간 동기화되는 값을 등록하고 초기값을 설정한뒤, 값이 변경될때마다 호출되게 해요.
print(Game.SomeBool)

--클라 스크립트에서-------------
print(Game.SomeBool) --서버에서 값이 바뀌었지만 클라에서도 동일하게 출력돼요.
```

<br>

| **void AddReplicateValue(string ValueName, string Data, ReplicateType Type, number Time)** |
| ------------------------------------------------------------------------------------------ |

해당 객체에 서버, 클라이언트 간 동기화가 가능한 문자열을 추가해요. (추가할 Value 이름, string 데이터, [Enum.ReplicateType.타입](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) , 동기화 시간)

\-- 샘플 --

```lua
--서버 스크립트에서-------------
Game:AddReplicateValue("SomeString", "Hello World!", Enum.ReplicateType.Changed, 0) --서버와 클라이언트간 동기화되는 값을 등록하고 초기값을 설정한뒤, 값이 변경될때마다 호출되게 해요.
print(Game.SomeString)

--클라 스크립트에서-------------
print(Game.SomeString) --서버에서 값이 바뀌었지만 클라에서도 동일하게 출력돼요.
```

<br>

| **void AddReplicateValue(string ValueName, Color Data, ReplicateType Type, number Time)** |
| ----------------------------------------------------------------------------------------- |

해당 객체에 서버, 클라이언트 간 동기화가 가능한 컬러를 추가해요. (추가할 Value 이름, Color 데이터, [Enum.ReplicateType.타입](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) , 동기화 시간)

\-- 샘플 --

```lua
--서버 스크립트에서-------------
Game:AddReplicateValue("SomeColor", Color.new(255, 0, 0, 255), Enum.ReplicateType.Changed, 0) --서버와 클라이언트간 동기화되는 값을 등록하고 초기값을 설정한뒤, 값이 변경될때마다 호출되게 해요.
print(Game.SomeColor)

--클라 스크립트에서-------------
print(Game.SomeColor) --서버에서 값이 바뀌었지만 클라에서도 동일하게 출력돼요.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
