Unable to change value of a variable from one blueprint in another

you need to check IsValid before the printString node, because that print string grabs data from your reference variable without checking it, which means it might be a null pointer, and if you never set it, than it definitely is a null pointer.