Variable updating but text isn't

So basically I want the text to bully you on how you died, so I use a global variable, basically, if you died to space rock, the death variable would be 1 and the game over text would change to “You can shoot ya know”, but it isn’t working for whatever reason.

I think you are changing the variable after the change scene, put that before, and add some logic like a button or something to change the scene

i encountered a problem when i was changing a variable and then set a text to that variable in the same frame, it was not updated on that frame.
i used a timer of 0.01 for the change text event and then it worked.