# After destroying an Actor, variable resets on all objects.

**URL:** <https://forums.unrealengine.com/t/after-destroying-an-actor-variable-resets-on-all-objects/386616>\
**Category:** Editor Scripting\
**Tags:** Variable, Destroy, click, actor, unreal-engine, question, Blueprint\
**Created:** [March 1, 2017, 2:31pm UTC](https://forums.unrealengine.com/t/after-destroying-an-actor-variable-resets-on-all-objects/386616 "2017-03-01T14:31:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artush](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artush](https://forums.unrealengine.com/u/Artush)\
**Post date:** [March 1, 2017, 2:31pm UTC](https://forums.unrealengine.com/t/after-destroying-an-actor-variable-resets-on-all-objects/386616/1 "2017-03-01T14:31:43Z")

</div>

Hello,

so i have this problem with my boolean variable, here is my blueprint for some simple item, where after player enters “sphere area” (onComponentBeginOverlap) i will set my boolean variable canCollect to true, after that player can pickit up (click,if true and destroy actor where he clicked). The problem is if i have multiple same actors in view and destroy one of them the variable canCollect will reset on all Actors to false.

 ![128273-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/9/d89bda31f10d84a3ee00472bab25b7b65a99d9bd.png)

![128274-click.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/a/85ae4517318360c75219fb14904241289436f25f.png)

cliking on the second actor does nothing, sphere should be big enough but it does not work and variable is set to false after picking up. If i move out of sphere and go back then i am able to destroy the second Actor.

Does anyone have some tip how to fix it ?  
I’m begginer in UE.

Thank you.
