Set Actor Reference Variable on Owning Client not working for clients

When I try to set an actor reference variable within a Run on Owning Client function, the variable is not set. It only works when the person running it is the server. The actor reference called HeadItem is set in the 3rd image.

EDIT: I fixed the problem. See the first reply for the solution.

The test string variable is properly set on the client, but the Head Item actor reference is not.

This part of the blueprint is probably not related to the issue but I’ll include it anyway

AttachEquipment4.PNG

AttachEquipment5.PNG

AttachEquipment6.PNG

AttachEquipment7.PNG

The reference to the actor will be used later when the player unequips the head item using Destroy Actor.

I’ve been stuck on this for several days so any help is appreciated. Let me know if you need any more info.

Everything works when I remove the OC AttachEquipment function and edit the blueprint in the 2nd image to look like this: