Frozen fortress infinitely loop

Hi icep077ke when posting your code it is important to format your code properly. Here is a link to help you here. But I think I can work with this. Have you tried taking out that piece of code and seeing if it works? If it still glitches it might have to do with some other loop.