Weapon is not getting destroyed

I’m creating in my inventory system I can figure out how to destroy the weapon I drop. Unreal Engine will not let me plug current weapon into Destroy Actor. I’ve tried using Destroy Component, it plugs in but does nothing.

Is your weapon a component or actor? If so what type? If it’s a component maybe GetOwner is what you want. Or if it’s say a static mesh component just SetStaticMesh to nullptr

UE is weird about actors destroying each other sometimes. Is weapon an actor attached to a bone socket as a child? If so, try detaching it first, then call an event on it which makes it self destruct after a timer.

Creating and destroying actors are some of the heaviest operations you may have.

Can’t you just disable it or hide it?

Are you sure current weapon is getting set? Also, what condition is the Branch node checking, i.e. why does it need to make sure the weapon names match?

hi, my guess is current weapon is of type some custom bp actor and so that’s why you cannot directly plug destroy actor. can u make a custom event in your current weapon class and there to that event, connect destroy node actor there and call here in this bp that event, and in that way, the actor can get destroyed i think

It is a SkeletalMeshComponent. GetOwner deletes the player and I can’t find Set Static Mesh.

The guns are SkeletalMeshComponent but your solution still worked Thx