DontDestroyOnLoad

This is my code
it doesn’t work,please i need help!

void Awake()
     {
     {
         if( Application.loadedLevelName == "Level 01")
                 DontDestroyOnLoad(this.gameObject);
         }
 }

The second bracket is in the wrong spot. it should be after your if statement not before your if statement.

Like this:

 void Awake()
{
if( Application.loadedLevelName == "Level 01")
{
DontDestroyOnLoad(this.gameObject);
}
}