Unit 4 Screen change code not working properly

I have students who have created code demonstrating all Unit 4 topics. They have a screen change in their code but it is not going to the proper screen. Why might this be happening?

Should the code for the screen change NOT be inside a function?
The only way I can get it to work properly is to not use a function…
The other option I am considering is that the boolean expressions are effecting it somehow, although their logic is good and code is clean…

Please let me know if anyone else has ideas as to why screen changes are not working properly…

Hello,
It is difficult to know the answer here without knowing what the code looks like. I have shared this Debugging Flowchart in the resources section of the forum. Perhaps it is a good place for your kids to start?
Otherwise, please create a share link to the project so we are able to have a better idea of what is going on.

Cheers,
Madeline