restart a scene

Hi
whenever i try to restart my scene my program simply freezes. I use :

        using UnityEngine.SceneManagement;

.
.
.

        SceneManager.LoadScene(SceneManager.GetActiveScene().name);

Can it have somthing to do with me using it during update and if yes where should i use it instead. (its an automatic restart after 5 minutes)

You’re calling that in Update()? So, every frame, the scene continuously reloads itself… hence the “freezing”. If you want the scene to reload after 5 minutes, use Invoke() specifying the appropriate delay.