game maker – Variable not set before reading it error in GameMaker Studio 2


I am following along with a guide. I’m trying to reference code from an instance in my room, but whenever I try to run the script I get this error:

ERROR in action number 1 of Create Event for object objSmileyFace:

Variable objHealth.(100004, -2147483648) not set before reading it.

at gml_Object_objSmileyFace_Create_0 (line 4) – objHealth.playerHealth = objHealth.playerHealth + 10;

gml_Object_objSmileyFace_Create_0 (line 4)

It says objHealth is not set, which is not true. What am I doing wrong?

Code screenshot