Destroying actors in Multiplayer

Hi everyone.
Im just getting into networking/replication in UE. Right now what i am trying to do is to have my character pickup an object from the world which is already there on the map.

I have an interface event which fires from the Character BP and tells the pickup it is being picked up, which then fires a Character’s event telling it to add the pickup to it’s inventory and passing through the properties, after that i want my pickup actor to be destoyed so that nobody can later pick it up as well.

The image you are seeing is the script for the pickup (Base Pickup Weapon).

My Base Weapon Pickup class (the one that has to be destroyed) is set to replicate already.
I’ve been trying out some things with no luck, so any help would be appreciated.

Hey, no the problem is the destroying part, everything else is working fine. I can’t get around destroying it, not even on the owning player. It did work correctly on the standalone version though.

I can only think it is not reaching the destroyself RPC. Are there any warnings or errors in your output logs that would indicate it skipped executing past there due to some nonfatal error?

which part is not working? All of it, the add to inventory, or the destroy?

No, there aren’t any errors in the log. I tried destroying destroying another instance of the actor created during gameplay from the Character BP (and destroyed from the Character BP) and it worked just fine. I don’t know why this isn’t working.

After searching through internet i found the problem. Replicated events can not be fired from actors who do not have a Net Owner, that means that they are possesed (owned by a player controller) or are a player controller. My pickups do not have a NetOwner so they couldn’t ask the server to destroy them.

So what i had to do is have the pickup ask the Character to destroy them (by a replicated event on the Character) after they’ve completed their function.

Ah yep. Sorry I didn’t notice that. I have run into that problem before many times. When it happens, I just create an RPC event in the playercontroller class to handle it and pass params to reference or find whatever I need to operate on.