Trailing behind players
The third available object that we will be going over in this chapter is Trail. The Trail object is like the beam effect as it has two points, though instead of the beam being statically placed, trails are emitted as the two points move within a space. This makes trails useful when creating things such as footprints, tracers, and moving objects. In this recipe, we will be looking at how to create a trail effect and then make it follow behind the players using a simple script.
How to do it…
We will start by inserting a Trail object into a part and then modifying its Lifetime and Color Sequence values to give it a fun gradient. We will then change the Max Length value and the ImageID texture. To finish, we will move the trail into the ServerStorage object and insert a script into the ServerScriptService object. To begin, follow these steps:
- Insert a Trail object into a part in Workspace.
- In the trail’s property box, change its Lifetime...