Trail starts drawing its segments at the positions of its
Trail/Attachment0 and *Attachment1.
When the Trail is
Trail/Enabled it will record the positions of its attachments every frame. It will connect these positions to the positions of the attachments on the previous frame. This creates a polygon that is then filled in by the Trail’s
Trail/Texture (if that Texture exists).
When created a Trail will not have any Attachments set by default. These will need to be set in order for the effect to work.
Creating a Part With a Basic Trail
This example demos the functionality of trails.
In order to do this, we must first create a
BasePart, part, which will be the parent of the trail.
Then, we create two attachments, attachment0 and attachment1, both parented to part. The positions of these two attachments, more importantly the distance between them, determines where the trail is drawn as part moves.
For these attachments to create a trail as described, we create a new Trail and parent it to part. We then connect attachment0 to
Trail/Attachment0 and attachment1 to
In this example, we set the
Trail/Color to a fade between blue and white using a
DataType/ColorSequence. For more info on how to set a trail’s color in a script, see the
Finally, to demo the alignment the example relies on
TweenService/Create to move part back and forth. As the part moves, the trail is drawn.