One-at-a-time

hello, here’s my problem: I have a faux animation of a red square which appears to have a slight resemblance of a human (2 eyes and one mouth), and is holding a rectangular bat. I’m trying to make it swing- once. The thing is, everytime the gamer presses the left mouse button the square swings. So if a gamer presses the left moust rapidly, it is doing a rapid fire swing- cheaters.

So here’s what I tried: I tried to create a boolean, if idle = true, then one could swing, if not, cannot.

Here’s the source file: