The LightInfluence property sets how much the trail is influenced by the lighting around it. The property can be set to a value from 0 to 1, with 1 being the most influenced and 0 be the least influenced.
Setting a Trail's Light Influence
This example demos the trail’s light influence property.
In order to do this, we must first set
Lighting/Brightness to 0. This is done to create a better demo lighting to demo the differences in the trail’s appearance when the light influence property changes.
Next, we 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 initially set the LightInfluence property to 1. Then, every 5 seconds we increment the property so that it toggles between 0 and 1. When the value is 0, the trail appears much brighter because it is not influenced by Lighting’s low brightness as compared to when the value is 1.
Finally, to demo the property the example relies on
TweenService/Create to move part back and forth. As the part moves, the trail is drawn.