I’m currently scripting some tf2 hats onto a darkrp server with PointShop by _Undefined. I have got the hats to go on the persons head but I’m trying to put the unusual particle effects onto the hats. I’m new to lua coding but this is the code I have done so far.
ITEM.Name = 'Bubbling Batter Helmet' ITEM.Price = 10000 ITEM.Model = 'models/player/items/scout/batter_helmet.mdl' ITEM.Attachment = 'eyes' function ITEM:OnEquip(ply, modifications) ply:PS_AddClientsideModel(self.ID) end function ITEM:OnHolster(ply) ply:PS_RemoveClientsideModel(self.ID) end function ITEM:ModifyClientsideModel(ply, model, pos, ang) PrecacheParticleSystem("unusual_bubbles") pos = pos + (ang:Forward() * -7) ang:RotateAroundAxis(ang:Right(), 0) ParticleEffectAttach("unusual_bubbles",PATTACH_ABSORIGIN_FOLLOW,prop,0) return model, pos, ang end
The error I get in console are:
Attemped to precache unknown particle system “unusual_bubbles”!
Any help is appreciated. Thanks.