You know the drill: my shoot script isn't working (again.)

Alrighty, welcome back to another episode of “My Shoot Script Won’t Work”. The problem is this: when I hold down the LMB, and isShooting = true, the bullet only fires once, like its on semi-auto. And, when I add the “break” function, it gives me this error: "No enclosing loop out of which to break or continue. How would I fix both of these problems? The script file is too large to post with no error, so I attached the file to github, and there is no download required.

if (Input.GetButtonDown (“Fire1”)) {

needs to be if get button(“Fire1”)

see this

It will not return true until the user has released the key and pressed it again.

So even though your holding the button down, after the first frame if(getbuttonDown…) returns false after the frame in which you clicked and it doesn’t fire again because of that.
Basically getbutton down is expressly for one click because of course people can’t act within a single frame often so if you want for example a single firing rifle you dont’ want to count 10 clicks cause it took them 10 frames to press and release when your running at 200fps

getbutton gets the current state and is for in this case automatic fire

get button down is a single click

get button up is the same way.

single release, get button up for example isn’t true the whole time your not clicking the mouse

I would change line 93, in your coroutine, to

while (isShooting == true) {

That way, your coroutine will keep firing, animating, and waiting until the shooting stops.