Buttons stop working on build

I am currently working on a game and all of the UI buttons are working just fine and are load the scenes when I click them but when i build the project the
they stop working. they change color when i hover over them like they should but then when I click the it does nothing.

You need to add your scenes to the build in the build settings window.
FileBuild settings → In the top of the window you’ll find Scenes in build and the button called Add open scenes. This button will put your scenes to the list.