Skip to content

Trails

System · Trails · server and client scripts

Trails draws short-lived beam and bullet trail segments between two world positions. A call on the server replicates to every client; a call on a client draws on that client alone.

Add

Function
Add(from: Vector3, to: Vector3, width: number, color: Color, life: number) -> ()

Add queues a trail segment from from to to with the given width (up to 256), color (Color.A sets opacity), and life in seconds (up to 30).

Example

-- Server script in a part: draw a bright tracer from the part.
local origin = self.Position
if origin then
    local tip = origin + Vector3.new(0, 0, -40)
    Trails.Add(origin, tip, 0.15, Color.new(1, 0.8, 0.2), 0.25)
end