Accessed none trying to read property?

Ok so I am currently working on a BP that allows one key to spawn and show actor while two other keys hide actor.

The blueprint is actually working but I keep getting this error:

Error Blueprint Runtime Error: Accessed None trying to read property Companion2 from function: ‘ExecuteUbergraph_BP_Player’ from node: Set Actor Hidden In Game in graph: EventGraph in object: BP_Player with description: Accessed None trying to read property Companion2

Not really sure how to go about fixing this or if it is anything to worry about? Any help would be greatly appreciated.

Its pretty self explaining. If you hit the Hide Key before you spawned anything your Code does not know what you want it to Hide becuase you tell him to hide None/Nothing/Null.

Make sure when you drag anything from a Blue Wire (Objects) those things exist (use a IsValid Node) before you try to do something with them. In a Shipped Game this would be a Hard Crash. In Engine it prevents the Crash and throws a error at you.

Edit: I also noticed you have the same Input event twice. Bad Practise solve it with one Input Event only since you cant guarantee the order of execution.

Btw. Access None Error is always the same thing. You try to use something that does not exist :stuck_out_tongue_winking_eye:

This works for my case. Thanks a lot guys!