I ask this because I have been getting the error 'Attempt to connect failed: Passed value is not a function.' It doesn't give me which line the error occurs so I don't what I have done wrong. The script for reference:
local Mouse
function onClick()
local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
end
function onEquip(a)
if Mouse ~= nil then
Mouse = a
Mouse.Button1Down:connect(onClick())
end
end
script.Parent.Equipped:connect(onEquip())
