# Hide a TextBlock after X seconds of been added to the viewport

**URL:** <https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [October 28, 2026, 9:21am UTC](https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125 "2026-10-28T09:21:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ViaCognita](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/viacognita/32/906601_2.png) [@ViaCognita](https://forums.unrealengine.com/u/ViaCognita)\
**Post date:** [October 28, 2026, 9:21am UTC](https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125/1 "2026-10-28T09:21:37Z")

</div>

Hi!

I have an User Widget with a TextBlock. I want to hide the text block X seconds after it has been added to the viewport.

 ![imagen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/0/ff039c5f209b796a5d55f1df1860572e6c85a80e.png)

Maybe there is an event in the User Widget triggered when it is added to the viewport.

Any idea?

Thanks!

---

<div class="post-metadata">

**Author:** ![BRGEzedeRocco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgezederocco/32/1216890_2.png) [@BRGEzedeRocco](https://forums.unrealengine.com/u/BRGEzedeRocco)\
**Post date:** [October 28, 2026, 10:28am UTC](https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125/2 "2026-10-28T10:28:08Z")

</div>

Hi @ViaCognita ,  
In the **Event Graph** , use the **Event Construct** event, which executes when the widget is constructed and added to the viewport.

Alternatively, you can use **On Initialized** , which only executes once per widget instance and does not run again when the widget is removed from and added back to the viewport.

> **[UUserWidget::Construct | Unreal Engine 5.8 Documentation | Epic Developer...](https://dev.epicgames.com/documentation/unreal-engine/API/Runtime/UMG/UUserWidget/Construct?lang=en-US)**
>
> Called after the underlying slate widget is constructed.

Next, use Set Timer by Event and set the time in seconds you want to wait before hiding the text. In this example, the timer is set to 2 seconds.

You can also use a Delay, as both options work for this case. However, I recommend using Set Timer by Event because it gives you more control over the timer, allowing you to pause, cancel, or restart it if necessary. This makes it more flexible if you need to expand the functionality in the future.

Make sure to check Is Variable for the TextBlock in the Designer panel so you can access it in the Event Graph.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/6/e86792b487c5c4403b8ce72a886dfc1c74df9415.png)  
Then, create a Custom Event called “Hide Text” and connect it to the timer’s Event pin.  
Inside that event, select your TextBlock (in this example, I named it Testing Text), call Set Visibility, and set its visibility to Hidden.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/b/62b6b41de38e7842da70c693f56166e4929dbb9a.png)

This way, the text will automatically be hidden after however many seconds you want.

Hope it helps!

---

<div class="post-metadata">

**Author:** ![ViaCognita](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/viacognita/32/906601_2.png) [@ViaCognita](https://forums.unrealengine.com/u/ViaCognita)\
**Post date:** [October 28, 2026, 10:30am UTC](https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125/3 "2026-10-28T10:30:11Z")

</div>

This is what I’ve done. This code is in PlayerController’s Event Graph:

 ![imagen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/f/2df02dc362210f2cc12b8d02168eca8f47803597.png)

---

<div class="post-metadata">

**Author:** ![BRGEzedeRocco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgezederocco/32/1216890_2.png) [@BRGEzedeRocco](https://forums.unrealengine.com/u/BRGEzedeRocco)\
**Post date:** [October 28, 2026, 10:53am UTC](https://forums.unrealengine.com/t/hide-a-textblock-after-x-seconds-of-been-added-to-the-viewport/2846125/4 "2026-10-28T10:53:23Z")

</div>

From what I can see and understand, your solution is also fine and should work without any issues.

I would do it inside the widget to keep all the logic related to the text’s visibility in one place. This keeps the code more organized and makes it easier to expand or reuse it in other levels or projects without having to implement the same logic in the PlayerController again.

For example, you could also do it this way.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/a/cbabcfdd7ab2e48d2d489907b27a1a1cfd78e798.png)

But in the end, it depends on how you’re more comfortable working. The good thing about game development is that there are different ways to achieve the same result, and what’s important is finding the approach that best fits your project and your way of working.
