This is the error code I’m getting when I press the button: Blueprint Runtime Error: "Accessed: None trying to read property MyGameInstance". Node: Restart Game Graph: EventGraph Function: Execute Ubergraph Widget BP Win Screen Blueprint: WidgetBP_WinScreen
If I didn’t know any better, I’d say the game instance is not initialised.
I would suggest adding rhe is valid check on the game instance and then add a print to each of the valid and invalid paths. This will tell you if the variable is valid or not… I would suspect not. This shouldn’t get uninitialised however.
One possibility is the cast is failing.
The best place to post this is in the Q&A for the course against the lecture.
I posted here cause my question is not posted in the lecture. Like, nothing happen at all when I press the button to post the question. Tried different browsers with/without inconito mode.
That means the cast is failing which is why you’re seeing the error you are seeing. Did you set the default game instance class in project settings to the correct class?