Script crash before the perfection fight

How do I fix script crashes?

Just restart the game and see whether it works