> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/korean/development/api-reference/classes/trail.md).

# Trail

Trail : `Instance`

## Overview

물체가 이동할 때 남기는 잔상(궤적) 효과를 생성하는 인스턴스로, 검기 효과, 스피드 부스트, 마법 궤적, 총알 흔적 같은 효과를 만들 때 사용됩니다.

Part와 같은 특정 오브젝트의 자식으로 설정하여 해당 오브젝트의 움직임에 따라 효과를 표시할 수 있습니다.

## Properties

### Color

`ColorSequence`

Trail이 생성되고 사라질 때 어떤 색상으로 점진적으로 표시될지 ColorSequence를 이용하여 설정할 수 있습니다.

Trail에 텍스처가 적용된 경우, 해당 텍스처 위에 이 색상이 오버레이되어 표현됩니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Color = ColorSequence.new(Color3.fromRGB(255, 0, 0))
```

### Enabled

`boolean`

Trail의 표시 여부를 지정하는 속성입니다.

Trail의 궤적이 남아있는 상태에서 Enabled를 false로 변경하면 즉시 사라집니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Enabled = false
```

### Lifetime

`number`

Trail의 궤적이 몇 초 동안 유지될지를 지정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.LifeTime = 0.5
```

### Offset

`Vector3`

Trail의 위치를 부모 객체를 기준으로 상대적으로 조정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Offset = Vector3.new(0, 100, 0)
```

### Texture

`string`

Trail에 표현할 텍스처를 지정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Texture = "ovdrassetid://1234"
```

### TextureLength

`number`

Trail에 적용된 텍스처의 길이를 지정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.TextureLength = 5
```

### TextureSpeed

`number`

Trail에 적용된 텍스처의 속도를 지정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.TextureSpeed = 10
```

### Transparency

`NumberSequence`

Trail이 생성되고 사라질 때 NumberSequence를 사용하여 투명도가 점진적으로 변화하도록 설정할 수 있습니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Transparency = NumberSequence.new(0.8)
```

### Width

`number`

Trail의 너비를 지정하는 속성입니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Width = 100
```

### WidthScale

`NumberSequence`

Trail의 너비를 NumberSequence를 사용하여 점진적으로 변화하도록 설정할 수 있습니다.

#### Code Samples

```lua
local Trail = script.Parent

Trail.WidthScale = NumberSequence.new(3)
```

## Methods

### Clear

Trail에 지금까지 그려진 궤적을 모두 지우는 메서드입니다. 호출 이후에는 현재 위치부터 궤적이 새로 그려집니다.

서버의 Script에서 호출하면 모든 클라이언트에서 궤적이 지워지며, 클라이언트의 LocalScript에서 호출하면 해당 클라이언트에서만 궤적이 지워집니다.

Enabled가 false인 경우에는 아무런 동작도 하지 않습니다.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

## Events

## See also

{% content-ref url="/pages/xSyoRShlKPjBIwbLoQMO" %}
[VFX](/korean/manual/studio-manual/object/vfx.md)
{% endcontent-ref %}
