Variables don't reset back to 0 unless you tell them to. Unless you post the exact code you're using, what event it comes from and where you have instances executing that code, nobody can tell you what's wrong.
If you set the score to 0 in the Create event of a persistent controller, an inappropriate place to do so would be in its Room Start event. You will lose the existing score whenever you change rooms for any reason. A persistent controller should only set the score to 0 in its Create event, and you should not place additional copies of the controller in more than one room.
If you set the score to 0 in the Create event of a non-persistent object, placing an instance of it in every room or in the final score room would be in appropriate. That will also lose the existing score when you change into that room. You should note the room where the score first becomes relevant, then create a transition room with an instance of that object in it and room_goto(your noted room); in its Room Creation Code. And instead of going straight into the game from the menu or anywhere else intending to start a new game, go to this transition room instead.
This is about scoping out where the score variable should start existing and where it should not be overwritten. It's not sexy enough a skill for tutorials to try covering it in droves, but there's nothing sexy about getting "variable not set" errors or losing variable values that you need to keep.
Okay I didn't know that. Ah gotcha. Here is the code. It's inside of a Draw Event on the object obj_game.
switch(room){
case rm_game:
draw_text(20, 20, "SCORE: "+string(score));
draw_text(20, 40, "LIVES: "+string(lives));
break;
case rm_start:
draw_set_halign(fa_center);
var c = c_yellow;
draw_text_transformed_color(
room_width/2, 100, "SPACE ROCKS",
3, 3, 0, c,c,c,c, 1
);
draw_text(
room_width/2, 200,
@"Score 1,000 points to win!
UP: Move
LEFT/RIGHT: Change Direction
SPACE: Shoot
>> PRESS ENTER TO START <<
"
);
draw_set_halign(fa_left);
break;
case rm_win:
draw_set_halign(fa_center);
var c = c_lime;
draw_text_transformed_color(
room_width/2, 200, "YOU WON!",
3, 3, 0, c,c,c,c, 1
);
draw_text(
room_width/2, 300,
"PRESS ENTER TO RESTART"
);
draw_set_halign(fa_left);
break;
case rm_gameover:
draw_set_halign(fa_center);
var c = c_red;
draw_text_transformed_color(
room_width/2, 150, "GAME OVER",
3, 3, 0, c,c,c,c, 1
);
draw_text(
room_width/2, 250,
"FINAL SCORE: "+string(score)
);
draw_text(
room_width/2, 300,
"PRESS ENTER TO RESTART"
);
draw_set_halign(fa_left);
break;
}