Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's wrong with my sword script?

There is a little part in my script and there is a really dumb error that isn't making my sword

tool.Activated:connect(function()
	local clickdelta = tick() - lastclick
	if clickdelta > swingtime  then
		lastclick = tick()
		hithumanoids = {}
		if clickdelta < swingtime + conbowindow then
			combo = (combo + 1) % 3
		else
			combo = 0
		end
		if player then
			if combo == 0 then
				event:FireClient(player, "RunAnimation", "SlashAnim2")
				slashsound:Play()
			elseif combo == 1 then
				event:FireClient(player, "RunAnimation", "ThrustAnim2")
				overheadsound:Play()
			elseif combo == 2 then
				event:FireClient(player, "RunAnimation", "OverheadAnim2")
				lungesound:Play()
				end
			end
		end
	end)
end)

Error: ')' expected (to close '(' at line 33 near 'end')*

*33 was supposed to be the start of the code.

1 answer

Change

             end
            end
        end
    end)
end)

to

             end
            end
        end
    end
end)

You had one too many ')'s.

1 comment

0

Still doesn't work. It still has a error thing under the last.

This discussion is preserved as it was. New answers, comments, and votes are closed.