I'm trying to make a tool that when the tool is equipped you would click and a particle emitter would be inserted into the local players head. This is what i have so far..
function onClick() game.Lighting["ParticleEmitter"]:clone().Parent = LocalPlayer.Head end script.Parent.onClicked:connect(onClick)
When you index "script.Parent" your goal is to index an existing event to connect to your function. You can't just say "onClicked", it does not exist. You probably want .Activated. Also:
LocalPlayer does not exist unless you defined it.
Please use ServerStorage over Lighting. (Switch this to a server script!)
local tool = script.Parent local sstorage = game:GetService('ServerStorage') function onClick() sstorage.ParticleEmitter:clone().Parent = tool.Parent.Head end tool.Activated:connect(onClick)
I recommend you do some basic tutorials such as these. http://wiki.roblox.com/index.php?title=AllTutorials