# Trail

Trail : `Instance`

## Overview

This instance creates an afterimage (trail) effect following a moving object, used for effects such as energy blade effect, speed boosts, magical trails, or bullet traces.

This can be parented to a specific object like a Part to display effects based on that object's movement.

## Properties

### Color

`ColorSequence`

A ColorSequence can be used to control the color of a trail as Trail appears and gradually fades out.

If a texture is applied to the Trail, this color is overlaid on the texture

#### Code Samples

```lua
local Trail = script.Parent

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

### Enabled

`boolean`

This property specifies whether the Trail is displayed.

If the property is changed from Enabled to false while the Trail is still visible, the Trail disappears instantly.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Enabled = false
```

### Lifetime

`number`

This property specifies how many seconds the Trail's trace persists.

#### Code Samples

```lua
local Trail = script.Parent

Trail.LifeTime = 0.5
```

### Offset

`Vector3`

This property adjusts the Trail's position relative to its parent object.

#### Code Samples

```lua
local Trail = script.Parent

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

### Texture

`string`

This property specifies the texture to be displayed on the Trail.

#### Code Samples

```lua
local Trail = script.Parent

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

### TextureLength

`number`

This property specifies the length of the texture applied to the Trail.

#### Code Samples

```lua
local Trail = script.Parent

Trail.TextureLength = 5
```

### TextureSpeed

`number`

This property specifies the speed of the texture applied to the Trail.

#### Code Samples

```lua
local Trail = script.Parent

Trail.TextureSpeed = 10
```

### Transparency

`NumberSequence`

When the Trail appears and fades out, a NumberSequence can be used to control how its transparency gradually changes.

#### Code Samples

```lua
local Trail = script.Parent

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

### Width

`number`

This property specifies the width of the Trail.

#### Code Samples

```lua
local Trail = script.Parent

Trail.Width = 100
```

### WidthScale

`NumberSequence`

A NumberSequence can be used to control how the Trail's width gradually changes.

#### Code Samples

```lua
local Trail = script.Parent

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

## Methods

## Events

## See also

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


---

# Agent Instructions: 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://docs.overdare.com/development/api-reference/classes/trail.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.
