Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
Trail
Inherits from: Instance → Object
The Trail object is used to create a trail effect between two attachments. As the attachments move through space, a texture is drawn on their defined plane. This is commonly used to create effects that visualize movements like tracer trails behind projectiles, footprints, tire tracks, and similar effects.
See Trails for more information.
Inherits from: Instance
Memory category: Instances
Code samples: View on Creator Hub (creating-a-part-with-a-basic-trail).
Properties
| Name | Type / Returns | Description |
|---|---|---|
| Trail.Attachment0 | Attachment | Along with Attachment1, determines where the trail will start drawing its segments. |
| Trail.Attachment1 | Attachment | Along with Attachment0, determines where the trail will start drawing its segments. |
| Trail.Brightness | float | Scales the light emitted from the trail when LightInfluence is less than 1. |
| Trail.Color | ColorSequence | The color of the trail throughout its lifetime. |
| Trail.Enabled | boolean | Determines whether the trail will be drawn or not. |
| Trail.FaceCamera | boolean | Determines whether the trail will always face the camera, regardless of its orientation. |
| Trail.Lifetime | float | Determines how long each segment in a trail will last, in seconds. |
| Trail.LightEmission | float | Determines to what degree the colors of the trail are blended with the colors behind it. |
| Trail.LightInfluence | float | Determines the degree to which the trail is influenced by the environment's lighting. |
| Trail.LocalTransparencyModifier | float | Determines a multiplier for Trail.Transparency that is only visible to the local client. |
| Trail.MaxLength | float | Sets the maximum length of the trail. |
| Trail.MinLength | float | Sets the minimum length of the trail. |
| Trail.Texture | ContentId | The content ID of the texture to be displayed on the trail. |
| Trail.TextureContent | Content | The texture displayed on the trail. Supports asset URIs. |
| Trail.TextureLength | float | Sets the length of the trail's texture, dependent on TextureMode. |
| Trail.TextureMode | TextureMode | Determines the manner in which the Texture scales, repeats, and moves along with the trail's attachments. |
| Trail.Transparency | NumberSequence | Sets the transparency of the trail's segments over its Lifetime. |
| Trail.WidthScale | NumberSequence | Scales the width of the trail over the course of its lifetime. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
Trail.Attachment0
A Trail starts drawing its segments at the positions of its Attachment0 and Attachment1. When the trail is Enabled, it records the positions of its attachments every frame and connects these positions to the attachments' positions on the previous frame, creating a polygon that is then filled in by the trail's Color and Texture.
Changing the attachments of a trail while a trail is drawing will remove all of the segments the trail has already drawn.
| Field | Value |
|---|---|
| type | Attachment |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Attachment1
A Trail starts drawing its segments at the positions of its Attachment0 and Attachment1. When the trail is Enabled, it records the positions of its attachments every frame and connects these positions to the attachments' positions on the previous frame, creating a polygon that is then filled in by the trail's Color and Texture.
Changing the attachments of a trail while a trail is drawing will remove all of the segments the trail has already drawn.
| Field | Value |
|---|---|
| type | Attachment |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Brightness
Scales the light emitted from the trail when LightInfluence is less than 1. This property is 1 by default and can set to any number within the range of 0 to 10000. Increasing the value of LightInfluence decreases the effect of this property's value.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Color
Determines the color of the trail throughout its lifetime. If Texture is set, this color will tint the texture.
This property is a ColorSequence, allowing the color to be configured to vary across the length of the trail. If the color changes after some of the trail segments have been drawn, all of the old segments will be updated to match the new colors.
| Field | Value |
|---|---|
| type | ColorSequence |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Code samples: View on Creator Hub (creating-a-trail-with-a-color-gradient).
Trail.Enabled
This property determines whether the trail will be drawn or not.
If set to false while a trail is drawing, no new segments will be drawn, but any existing segments will be cleaned up naturally when they reach the end of their Lifetime. To forcibly clean up existing segments, call the Clear() method at the same time.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Emission |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.FaceCamera
A Trail is a 2D projection existing in 3D space, meaning that it may not be visible from every angle. The FaceCamera property, when set to true, ensures that the trail always faces the CurrentCamera, regardless of its orientation.
Changing this property immediately affects all existing and future trail segments.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Lifetime
The Lifetime property determines how long each segment in a trail will last, in seconds, before it disappears. Defaults to 2 seconds but can be set anywhere between 0.01 and 20.
The lifetime of a trail is also used by that effect's Color and Transparency properties to determine how each segment is drawn. Both of these properties are sequences, meaning that they define their values at certain keypoints in the segment's lifetime and then interpolate between the values as the segment ages.
If a trail's lifetime changes, existing segments will immediately behave as if they always had the new lifetime, meaning that if they've existed for longer than the new lifetime, they will be removed immediately.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Emission |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.LightEmission
Determines to what degree the colors of the trail are blended with the colors behind it. It should be set in the range of 0 to 1. A value of 0 uses normal blending modes and a value of 1 uses additive blending.
This property should not be confused with LightInfluence which determines how the trail is affected by environmental light.
Changing this property immediately affects all existing and future segments of the trail.
This property does not cause the trail to light the environment.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.LightInfluence
Determines the degree to which the trail is influenced by the environment's lighting, clamped between 0 and 1. When 0, the trail will be unaffected by the environment's lighting. When 1, it will be fully affected by lighting as a BasePart would be.
Changing this property immediately affects all existing and future segments of the trail.
See also LightEmission which specifies to what degree the colors of the trail are blended with the colors behind it.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.LocalTransparencyModifier
The LocalTransparencyModifier property is a multiplier applied to the trail's Transparency that is only visible to the local client. It does not replicate from client to server and is useful for when a trail should not render for a specific client.
Uses the same formula as BasePart.LocalTransparencyModifier:
1 - ((1 - Transparency) × (1 - LocalTransparencyModifier))
A value of 0 (default) has no effect on the trail's transparency. A value of 1 makes the trail completely invisible to the local client regardless of its Transparency value.
| Field | Value |
|---|---|
| type | float |
| tags | ["Hidden","NotReplicated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":false,"can_save":false} |
| capabilities | ["Basic"] |
Trail.MaxLength
This property determines the maximum length of the trail, in studs. Its value defaults to 0, meaning that the trail will not have a maximum length and trail segments will expire in their Lifetime.
This property can be used alongside the MinLength property which determines the minimum length a trail must be before it's drawn.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Emission |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.MinLength
This property determines the minimum length of the trail, in studs. If neither of the trail's attachments have moved at least this value, no new segments will be created and the endpoints of the current segment will be moved to the current position of the attachments.
Note that changing this property will only affect new segments that are drawn; any old segments that have already been drawn will maintain their current length.
This property can be used alongside the MaxLength property which determines the maximum trail length before its oldest segments are erased.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Emission |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Texture
The content ID of the texture to be displayed on the trail. If this property is not set, the trail will be displayed as a solid plane; this also occurs when the texture is set to an invalid content ID or the image associated with the texture has not yet loaded.
The appearance of the texture can be further modified by other trail properties including Color and Transparency.
Scaling of the texture is determined by the distance between Attachment0 and Attachment1, as well as the TextureMode, TextureLength, and WidthScale properties.
| Field | Value |
|---|---|
| type | ContentId |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Code samples: View on Creator Hub (creating-a-trail-with-a-pawprint-texture).
Trail.TextureContent
The texture displayed on the trail. Supports asset URIs.
This property is the Content equivalent of Texture. Assigning TextureContent updates Texture.
If this property is set to Content.none, the trail displays as a solid plane colored by its Color property. The appearance of the texture can be further modified by Color and Transparency. Scaling of the texture is determined by the distance between Attachment0 and Attachment1, as well as TextureMode, TextureLength, and WidthScale.
| Field | Value |
|---|---|
| type | Content |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.TextureLength
Sets the length of the trail's texture, dependent on TextureMode. Changing this property immediately affects all existing and future trail segments.
| Field | Value |
|---|---|
| type | float |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.TextureMode
This property, alongside TextureLength, determines how a trail's Texture scales, repeats, and moves along with the trail's attachments. Changing this property immediately affects all existing and future trail segments.
Scale and Repetition
When TextureMode is set to TextureMode.Wrap or TextureMode.Static, the TextureLength property sets the length of the texture as it repeats across the trail's length.

When TextureMode is set to TextureMode.Stretch, the texture will repeat TextureLength times across the trail's overall length.

Movement
The TextureMode property also affects the movement of the trail's texture as follows:
If set to
TextureMode.Stretch, the texture will stretch out based on the lifetime of the trail, and shrink inwards if the trail's attachments stop moving.If set to
TextureMode.Wrap, the texture will be tiled as the length of the trail changes, but the textures will remain stationary relative to their attachments.If set to
TextureMode.Static, the texture will be rolled out as the attachments move, and they will remain in place until their lifetime is met. This setting is ideal for trail textures that should appear "stamped" where rendered, such as paw prints or tire tracks.
| Field | Value |
|---|---|
| type | TextureMode |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.Transparency
Sets the transparency of the trail's segments over its Lifetime. This value is a NumberSequence, meaning it can be a static value or can change throughout the lifetime of the trail segments.
| Field | Value |
|---|---|
| type | NumberSequence |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Appearance |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Trail.WidthScale
This property is a NumberSequence that scales the width of the trail over the course of its lifetime. Values can range between 0 and 1, acting as a multiplier on the distance between the trail's attachments. For example, if the trail's attachments are 2 stud's apart and the value of this property is 0.5, the trail's width will be 1 stud and the trail will be centered between the two attachments.
| Field | Value |
|---|---|
| type | NumberSequence |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Emission |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["Basic"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| Trail:Clear | () | Clears the segments of the trail. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
Trail:Clear
This method immediately clears all segments of the trail and is useful for cleaning up trails with longer lifetimes or for cases where the trail should be removed because of a specific action.
Calling this method only affects existing segments. To clear existing trail segments and temporarily prevent new segments from being drawn, toggle the trail's Enabled property to false at the same time.
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["Basic"] |
Events
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |