Script malfunction on scene change

Hello all!

I have 2 scenes on my project. The Scene 2 can be accessed by clicking a button on Scene 1. When I run my project, I am able to access Scene 2 by clicking the button on Scene 1 but when I try to do my operations in Scene 2, I get stuck in the loading part. Here’s the thing, when I run my project directly on Scene 2, the operations are functioning well. What could be the cause of this problem? Any heads up would be appreciated. TIA.

Check build setting and add both scenes in build settings!