Accessed None trying to read property

Hi all! I’m making my game on UE5, and I ran into the following problem when trying to implement the mechanics of picking up items:

Blueprint Runtime Error: “Accessed None trying to read property Held Component.” Node: Set Render Custom Depth Graph: EventGraph Function: Execute Ubergraph BP First Person Character Blueprint: BP_FirstPersonCharacter

Despite the error, the mechanics work quite well.

I also tried to get rid of it using “Is Valid”, but it just broke the whole function.

Thank you in advance!

Hey there @user_88645128729c6a8b4d39750d91b1c56a52b648699aa4152ba51b8f! Welcome to the community! This looks mostly sound, though my response would have naturally been to place a valid check on the held component, it seems you’d tried that. I’m wondering why it could have broken the function. Stepping through the BP my fix would be to validate this one here:

image

Does the system work every time fine after the first instance of the error or does it error every time?

Hello! Thanks for the answer! Didn’t answer because I forgot about this post… :point_right::point_left:

It is to this part of the code that the error is sent (also to “Set target location and rotation”, but not all the time).

As I understand it, I’m somehow referencing the Physics handle component incorrectly? I get it from Physics handle like this:
image

Something like that!