keep my character in the same position between scenes

hi
i’m creating a game in unity and i want to keep my character in the same position when i change the scene.
i’ve tried DontDestroyOnLoad(transform.gameObject) but the character isn’t there when i switch to another scene. anyone have a solution

With DontDestroyOnlLoad the object keeps it’s position from the previous scene. So,when it loads in the second scene you may have not created environment there so it falls to the blank space.