Weird error with end)

For some reason the end) is erroring on this script.

script.Parent.Equipped(Connect(function(Mouse)
	Mouse.Button1Down:Connect(function()
		local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
		animation:Play()
	end
end)

How can I fix this?

In the first line, replace the first ( with a :

1 Like

You also need to add a parenthesis after the first end to close the open parenthesis on line 2 after Connect