Unity Editor Freezes- Help! Urgent!

Hello. I'm currently working on a script that slows time using Time.timeScale and shows up an arrow with SpriteRenderer, and then, rotate it and hide his sprite again after x seconds, putting the time back to normal. I think it should work fine, but unity, when that functoin is called, freezes and I have to open windows task manager to close it. An answer would be apreciated, thanks!

[script]

using System.Collections; using System.Collections.Generic; using UnityEngine; using CnControls; using Random = UnityEngine.Random;