Function casting to playercharacter failed?

I have been having issues getting save/load to work in the game, but I’ve got everything working now except for this:

I’m trying to use cast to mainchar1 to have the savemechanic set mainchar1’s health, ammo, and location to whatever it was saved at. however, when I run the game, and click “load game” in the main menu, the last print string is “Cast to mainchar failed” which is set to show if the cast to mainchar1 fails. I can’t figure out why. :frowning:

I’ve tried promoting mainchar1 to a variable and setting it attached and unattached to the cast, if i set it while not attached to the cast, the rest of the code seems to work but it can’t read mainchar1, ive tried rearranging it many times, ive tried changing the object, etc.