how to make a jumpscare then the game ends

trying to make a jumpscare where someone runs up to the player and a UI pops up and then changes to the main menu

(idk how to explain it)

I hate those kind of games.

Sorry.

Google: phrase “unity how to create jumpscare with trigger”

First result:

Result from our forum (there is even copy-paste code):