# Spawn an Actor using a widget button

**URL:** <https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213>\
**Category:** Blueprint\
**Tags:** actor-blueprint, spawn-actor, unreal-engine, Blueprint, question\
**Created:** [June 24, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213 "2017-06-24T17:15:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fajelarodel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fajelarodel](https://forums.unrealengine.com/u/fajelarodel)\
**Post date:** [June 24, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/1 "2017-06-24T17:15:53Z")

</div>

Hello. I want to spawn an actor using a widget button. I have found a document that let’s you spawn actors by pushing a specific key (done on level blueprint) but what I need is to spawn an actor on a target by pressing a widget button. I tried to Implement what I did on the level blueprint to a widget I created but nothing happens

---

<div class="post-metadata">

**Author:** ![fajelarodel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fajelarodel](https://forums.unrealengine.com/u/fajelarodel)\
**Post date:** [June 24, 2017, 5:21pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/2 "2017-06-24T17:21:08Z")

</div>

I also need that Actor to be invisible before I click the button because currently It is already visible and placed inside the game when I press play. Thank you in advance

---

<div class="post-metadata">

**Author:** ![MatzeOGH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MatzeOGH](https://forums.unrealengine.com/u/MatzeOGH)\
**Post date:** [June 24, 2017, 5:49pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/3 "2017-06-24T17:49:33Z")

</div>

You are probably not defining the class to spawn. How are you setting the reference for the piece and target variable?

---

<div class="post-metadata">

**Author:** ![fajelarodel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fajelarodel](https://forums.unrealengine.com/u/fajelarodel)\
**Post date:** [June 25, 2017, 5:58am UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/4 "2017-06-25T05:58:20Z")

</div>

I create a variable and then on the variable type I find and select the Piece and the Target

---

<div class="post-metadata">

**Author:** ![m-motion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@m-motion](https://forums.unrealengine.com/u/m-motion)\
**Post date:** [June 25, 2017, 8:37pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/5 "2017-06-25T20:37:26Z")

</div>

Here is a very quick Tutorial:

 ![201278-spawn.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/5/df53c667be32d5ad945acdf07cf663e591b76a0e.jpeg)

in Your Widget BluePrint

- add “get all Actors with tag” , on tag name enter “SpawnHere”
- make a “for each Loop” out of “get all actors” node
- “get location” of forEachLoop’s “Array Element”
- add a “Spawn actor” node and connect it to “ForEachLoop”
- connect “get actor Location” to “Spawn Transform”

in your Level:

- add a “Target Point” actor
- search for word “tag” in in target point properties, Actor Tag will show up
- add a new tag and enter “SpawnHere”

now when you run the game, as soon as you pres the button in your widget a new actor will spawn at the location of this target point. you can copy this target point to multiple location and it will spawn a new actor in each of those locations.

---

<div class="post-metadata">

**Author:** ![Naimaste](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/naimaste/32/474775_2.png) [@Naimaste](https://forums.unrealengine.com/u/Naimaste)\
**Post date:** [June 3, 2022, 4:49pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/6 "2022-06-03T16:49:19Z")

</div>

Whats the point of exec loop ?

---

<div class="post-metadata">

**Author:** ![Megaarts](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Megaarts](https://forums.unrealengine.com/u/Megaarts)\
**Post date:** [March 26, 2023, 8:11pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/7 "2023-03-26T20:11:28Z")

</div>

hello, I used this to spawn an actor with a UMG widget, The issue i’m having is that the Widget actor is no longer able to follow the rotation of another actor I want this one to spawn in and act as a child to the rotating actor but it does not update to location making the alinement wrong.

---

<div class="post-metadata">

**Author:** ![DeepwebsJohnWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/deepwebsjohnwick/32/605006_2.png) [@DeepwebsJohnWick](https://forums.unrealengine.com/u/DeepwebsJohnWick)\
**Post date:** [July 15, 2024, 1:02am UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/8 "2024-07-15T01:02:21Z")

</div>

This was really helpfull!!! Thank you!

---

<div class="post-metadata">

**Author:** ![skyhunter2090452](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skyhunter2090452](https://forums.unrealengine.com/u/skyhunter2090452)\
**Post date:** [April 10, 2025, 10:29pm UTC](https://forums.unrealengine.com/t/spawn-an-actor-using-a-widget-button/399213/9 "2025-04-10T22:29:04Z")

</div>

Hello What if i want to spawn something multiple times based on the amount I want, lets say i have a widget where I’m able to click from 0 to 15 how would I be able to spawn the amount that I want?
