Trail SWEP im clueless

I can make an SWEP just fine all I need to know is how would I go about making it so that the player that is shot has a trail applied to them

I found this http://wiki.garrysmod.com/?title=Util.SpriteTrail
but dont quite understand it

Trace, hit an entity, check if it is a player, then apply the trail:
[lua]
local pos = self.Owner:GetShootPos()
local ang = self.Owner:GetAimVector()
local tracedata = {}
tracedata.start = pos
tracedata.endpos = pos+(ang*80)
tracedata.filter = self.Owner
local trace = util.TraceLine(tracedata)
if trace.HitNonWorld and trace.Entity:IsPlayer() then
target = trace.Entity
local trail = util.SpriteTrail(target, 0, Color(255,0,0), false, 15, 1, 4, 1/(15+1)*0.5, “trails/plasma.vmt”)
end[/lua]
Taken entirely from these 2 pages:

	 		**[Util.TraceLine

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Util.TraceLine)****
[Util.SpriteTrail

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Util.SpriteTrail)**

You sir, are the best :smiley: