# \[WorldPartition\] How to prevent an actor to run script again when loaded second time?

**URL:** <https://forums.unrealengine.com/t/worldpartition-how-to-prevent-an-actor-to-run-script-again-when-loaded-second-time/664197>\
**Category:** World Creation\
**Tags:** Destroy-Actor, World-Partition, unreal-engine, UE5-0, question\
**Created:** [October 7, 2022, 9:30am UTC](https://forums.unrealengine.com/t/worldpartition-how-to-prevent-an-actor-to-run-script-again-when-loaded-second-time/664197 "2022-10-07T09:30:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [October 7, 2022, 9:30am UTC](https://forums.unrealengine.com/t/worldpartition-how-to-prevent-an-actor-to-run-script-again-when-loaded-second-time/664197/1 "2022-10-07T09:30:28Z")

</div>

I have an `ActorX` that runs a script (spawns a different random actor) when being loaded. That `ActorX` is added to world partition map. And when its loaded by world partition it runs a script (and spwans an object on begin play).  
But when player goes to far from that partition that partition is unloaded and `ActorX` is destroyed. And when players comes back `ActorX` is loaded again and runs script again (but i don’t want it to run script again).

So how to prevent this `ActorX` to run script second time. Whats the proper and good technique to process dynamic spanwers/script-runners like that in a big open world.
