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
1 comment
Ok now i need to make it not spammable.