So the issue that you were having was that you were creating a connection to the .Touched event every time you fired the RemoteEvent, and then not closing the connection. The problem with this is that once you create it, it remains. So after the first time it was created, it was always listening for a collision. My suggestion fixed this by creating a variable that the .Touched event would check, to see if you had actually swung the hammer. The edited script I posted did not handle the scenario where the hit did not connect after swinging. To do that you could wait for the duration of the swing and then set knockback to false.
Another solution to your problem is what @XdJackyboiiXd21 suggested, which is to disconnect the connection to the .Touched event. Both methods should work just fine.