add key for all players

Hi, I’d like some help, I bought a bp door component (replication) on the market place, it works perfectly, I managed to adapt it to my AI and the rest, but I have a small problem concerning the keys to open these doors. I don’t want to include them in my inventory system, I just want the player to find it and then be able to open the door in question, only if the player has taken the key and dies, the key disappears too, and in multiplayer it’s not cool. So when a player finds a key and picks it up, I’d like it to be added to all the players. I’ve tried for each loop the add item on all my bp but it seems to fail.
when I pick up my key (bp_loot)


and the add item function of the bp door component

no one has any ideas?

The most simple way without adding a key array or variable to an inventory system would be to set a “has key” boolean on your character class. Beyond that an event dispatcher in your door class that’s bound to the key pickup event could unlock the door but that would be kind of CPU heavy.

when player picks up key, it should be added to all players mean? to the team you meant or?

What about this? In your key blueprint, you could add a public variable reference to a door actor. Then, set the corresponding door reference on each instance of a key. When picking up the key, the player blueprint can trigger an unlock event on the right door.