Lua particles help

So I’ve been trying to figure out how to make particles for things like when you open something just make confetti come out or something. I spent hours try to understand it from these threads:
http://forum.facepunch.com/showthread.php?t=883304
http://forum.facepunch.com/showthread.php?t=1241975
http://forum.facepunch.com/showthread.php?t=1234647

and also used the wiki’s to find out how to make it. I used tf2 to make a particle using the -tools startup command. The problem is I don’t understand how to use them since they’re kind of not really documented, Could anyone show me how to make effects like those? The closest thing I got was making this:


game.AddParticles("particles/item_fx.pcf")
PrecacheParticleSystem("superrare_circling_heart")

local function head()	
local ply = LocalPlayer()
local HeadIndex = ply:LookupBone( "ValveBiped.Bip01_Head1" )  
local HeadPos, HeadAng = ply:GetBonePosition( HeadIndex )
ParticleEffect("superrare_circling_heart",HeadPos,HeadAng,ply)
PrecacheParticleSystem("superrare_circling_heart")
ply:StopParticles()
end
timer.Create( "UniqueName1", .2, 0, head )

the timer is to update the position else it will stay in one position, the whole code is in one file and opening it using lua_openscript_cl, and for some reason sometimes the particle won’t load and will spawn big red X’s as the particle instead. I need information on how to properly use particles.