How do I destroy a component on the client?

So i’m trying to make an equipment system:

When I pick up an item, I want to attach it to my character and make sure that everyone can see it. (server & clients) This is working. but there is one problem: The collision box which i’m using to pick it up, still exists. When I’ve equipped a helmet, anyone else can steal my helmet because this collision box is still there. So I’ve tried to destroy that collision box (destroy component) but it doesn’t work no matter what I do.

the client is able to destroy a component in an actor, but the server and other clients can’t see it. It only happens locally. I’ve tried destroying the component on the server but that doesn’t seem to work either. I’ve also tried to destroy it and multicast it but with no effect. Sometimes the client doesn’t want to execute any of my functions. I feel like i’m missing 1 simple and important thing. I’ve been struggling with this for 4 days now and I really can’t find a solution anywhere on the entire internet. I’ve basically tried every possible way and now i’m tired and stuck.

Any help will be grately appreciated! If this gets fixed my entire project will fix itself.

First picture: My helmet blueprint

Second picture: Here you can see how I equip my helmet on the server.

Third picture: Here you can see what I want to destroy on client and server.

273806-1.png

273807-3.png

Did you replicate the item correctly?
Did you try to Destroy the helmet completely? just to test if your destruction does actually replicate.
Personally I would just disable the collider, because you might want to throw the helmet down and someone might want to pick it up later…just an idea. “SetCollisionEnabled” is your friend here I think :smiley:

In your first image the client is interacting with the collision box and then destroying it. This will only happen on that client.

Then, image 2, the server puts the helmet on your client.

But nobody has told the other clients to destroy the collision box?

After the server puts the helmet on the client it needs to multicast to an event that destroys the collision box on all the clients. (you maybe should not even destroy the collision box at all on the first client that hits the collision box before calling the server).

What do you think? maybe?

I’ve tried to completely destroy the helmet, and yes, this works for some reason. And you’re right about disabling the collider, I was thinking about setting the line trace channel i’ve created to ignore, I’ve tried that but with no effect, same issue I suppose.

Hmm, i’ll try that this afternoon! I’ll let you know :slight_smile:

Ok I found out my repcliation is correct, after some research it seems like I can’t destroy the component from my actor. I have to destroy this component on the server so it’s destroyed for clients and the server, but how do I reference a component from an actor in another blueprint so I can destroy it there? I’ve tried lots and lots of ways and solutions but it doesn’t work. let me know if you need any screenshots or visualizations.

ps: Sorry for the late reply, I got really busy at work while figuring this one out.