Edit: Done
Did a few changes. Not much else.
Explanation: It could be possible that this is a ROBLOX Studio bug. It could also because of a very long loop that potentially breaks the script.
Potential Solve: Try restarting your ROBLOX Studio. If a restart doesn't work then uninstall studio and re-install it.
Summary: I wish I could give you more information on why it isn't working, how to fix the issue, HOW the issue is being caused, etc. I will get back to you once I review this more and test out my scripts to see if I get the same problem.
-GamerKreep