Trying to destroy sword on pick up

Not sure what I am doing wrong here or why it isn’t working but I have a sword BP that the main player can pick up and equip. What I want to happen is as soon as the player has the sword the sword in the game map disappears as if the player picked it up. In the sword BP I set when the player picked up the sword and then on an event tick branched true when sword was picked up to destroy the sword after a slight delay but it doesn’t work for some reason. Can anyone see where I am going wrong with the below BP or even have a better way of doing this?

73759a5e2d280e103584bc564c276b7d312ebbc8.jpeg

Is the sword component a solid object? If so, use the OnComponentHit Event instead of the OnComponentBeginOverlap Event.

Also, if you have the Level Editor and the Event Graph open at the same time (with 1 monitor, shrink both windows so one takes up the top-half of the screen and the other the bottom-half) you can see in the Event Graph which Nodes are firing while you simulate the game. That way you can isolate the problem and determine if the collision event is even firing, if the problem is happening with the cast, etc.

Why the Tick Event? Just call the Delay + Destroy where you currently set the boolean to true.

Also how do you actually equip the weapon, because if you destroy the actor, it’s gone. Are you only getting the Sword Mesh and give that the player or what are you doing there?
(Just want to save you from referencing the Sword actor while also destroying it, which wouldn’t work.)

Also is that a Singleplayer or Multiplayer game?

It is solid but it didn’t work probably because I checked and this part of the BP isn’t doing anything.
81702330f67fac5e0cd3a15da3a8280637326665.jpeg

Its a single player game. I thought the OnComponentBeginOverlap was telling the game when the player was equipping the sword but it wasn’t doing anything. Instead I set up a bool in the main player character to tell the game when the player has the sword.

9a5b17e308c59a01a982b46a28a2cb2697eecb2d.jpeg

Which now works when I set this in the sword BP.

but that is doing what you said it would which is destroying both the equipped and unequipped sword. Not sure what to do from here.

Instead of spawning a new one, just use the one you overlap.

Create an event/function in your player that has this weapon as an input and then pass it and attach it on overlap.

I’ll try that thanks.

So I took and amended a weapon BP pickup I had for VR controllers and it works perfectly for picking up stuff with my right hand but…

cdccb57f83dca73c06284be6da040cb61cb293dc.jpeg
2de3e6845798a9e16327d1f5efef33371c2e3ca4.jpeg
631616deb057f205e5d4a6b81c9d363442c4c590.jpeg
09eeeb380b5eaf41b56ace6faf554c72143e5c25.jpeg
9655664e86cfca2a4■■■631e4c5c9d904474c6ec.jpeg

I thought to get it to work with the left hand would be as simple as replicating those functions for the left hand but when it came to the OnRep_EquippedWeapon that seemed to override the OnRep_EquippedWeaponleft I created. Even when I deleted OnRep_EquippedWeapon, OnRep_EquippedWeaponleft wouldn’t work even though it was exactly the same BP just with left at the end of its name so something in the other functions is making sure OnRep_EquippedWeapon will only work. Can you see any other way I can get the left hand pickup to work?