# Why is my construction script not fully working ?,why is my construction script not working?

**URL:** <https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036>\
**Category:** Blueprint\
**Tags:** spawn, beginplay, unreal-engine, construction-script, issue, Blueprint, question\
**Created:** [January 10, 2019, 2:07pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036 "2019-01-10T14:07:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_yakin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_yakin](https://forums.unrealengine.com/u/_yakin)\
**Post date:** [January 10, 2019, 2:07pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036/1 "2019-01-10T14:07:48Z")

</div>

hi i have a problem here where if i put my construction code in a beginplay event it would work fine but when its in the construction script the code wont fully work  
i tested with printing all the code work except for spawn actor for some reason !  
the code works fine in begin play !  
thanks for help in advance

,

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [January 10, 2019, 2:17pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036/2 "2019-01-10T14:17:51Z")

</div>

You can’t spawn an actor when the game hasn’t begun yet. The construction script runs when you alter any detail in your actor, even in the viewport. You can’t expect it to spawn anything when there’s no game to spawn it into. You can do the spawning on Begin Play.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [January 10, 2019, 2:22pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036/3 "2019-01-10T14:22:32Z")

</div>

You can’t spawn actors in the construction script because it runs when an instance of that class is created or modified in the editor. So it runs when you place an actor in the level, when you move it or modify any other parameter on it and it would be quite unfortunate if it started spewing actors all over the place. 🙂

It is helpful to think about the construction script as the place to get the actor ready _internally_ for the game and for the editor (should the level designers need to work with them). That is the place to create/modify components and to calculate/store data to be used when the game begins.

---

<div class="post-metadata">

**Author:** ![\_yakin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_yakin](https://forums.unrealengine.com/u/_yakin)\
**Post date:** [January 10, 2019, 2:51pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036/4 "2019-01-10T14:51:23Z")

</div>

you are a saint thank you

---

<div class="post-metadata">

**Author:** ![\_yakin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_yakin](https://forums.unrealengine.com/u/_yakin)\
**Post date:** [January 10, 2019, 2:52pm UTC](https://forums.unrealengine.com/t/why-is-my-construction-script-not-fully-working-why-is-my-construction-script-not-working/441036/5 "2019-01-10T14:52:07Z")

</div>

thanks man  
misunderstanding from my part on how it works
