Destroy BP actor replicated

Hey, I made a BP actor that is set to replicate itself. In it I got some code to supposedly destroy itself when the player interacts with it. For the interaction i tagged the BP actor with “interactable” and the Player checks on overlap if the actor has this tag; If so then cast to the actor and execute the event. Sadly my implementation only works on the server window while the client can call this event as often as he wants without destroying the actor. I already tried doing it with the gamemode and gamestate which also did not work :confused:

Screenshot attached :slight_smile:

Player:

GhostSlime:

if its replicated you should only need to destroy it on server. no multicast required.

its possible you dont have authority to call the RPC, maybe replace it with a switch has auth → destroy actor

sadly still only works on server player not on client too :frowning:

you dont need the server rpc there can just call the switch in your sequence.

so when you spawn the actor you only spawn it on server too yeah? its possible you have duplicates

generally speaking on your code here though, basically all of it should be done on server side. so you overlaps and interacts should be server authority only. then actions like open door are the things that should be replicated to the client

Should be on the server only :eyes:
I spawn those actors via the level blueprint and well those are replicated…
I’m really new to replication stuff and i don’t think i got the grasp for it now… maybe you can help me with it over discord and i post the solution here when we get it done?
Feel free to add me if you want: can.07

yeah replication takes a while to understand.

think of it this way, right now you’re running on overlap (all) so you run the possibility of getting different results, this could be because of lag or straight up cheating. or in this case this case you’ll have duplicate events because every actor (client and server) is calling a multicast which means its being called multiple times.

i dont use level blueprint so im not 100% sure but wherever you spawn put a switch has auth before it and start there,
another good practice is to add prints strings, see whats calling where and by who. so after spawn is it only called by server or everyone, and in destroy is it being called by anyone and who?