# How do I set text blocks visible and how can I change their text in Verse

**URL:** <https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [August 10, 2023, 12:21am UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196 "2023-08-10T00:21:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [August 10, 2023, 12:21am UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/1 "2023-08-10T00:21:02Z")

</div>

The titles says it all. I have 5 text blocks already created in a canvas and I want to set them to visible when something happens and change their text depending on the situation.

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [August 10, 2023, 12:28am UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/2 "2023-08-10T00:28:31Z")

</div>

This tutorial might help you

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/4/8c4d960af3c700ae4175f24def53bc2a53710cc4.jpeg "How To Make A Distance Tracker To Or From A Player In UEFN") ](https://www.youtube.com/watch?v=HVbM9eVJjUs)

---

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [August 10, 2023, 1:51pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/3 "2023-08-10T13:51:41Z")

</div>

I watched it but it still doesn’t answer my question since you’re making the text blocks by code, I just want to set their visibility and edit the text (i already made the canvas and text blocks)

---

<div class="post-metadata">

**Author:** ![GraemeBB](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/graemebb/32/1106150_2.png) [@GraemeBB](https://forums.unrealengine.com/u/GraemeBB)\
**Post date:** [August 10, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/4 "2023-08-10T15:18:11Z")

</div>

That’s the point, you have to do it via code though. I have no idea how to do it otherwise, I don’t think you can.

---

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [August 10, 2023, 3:26pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/5 "2023-08-10T15:26:19Z")

</div>

Create a method like this to convert the text from a `string` to a `message` type:  
`SetDynamicText<localizes>(Value:string) : message = "{Value}"`

Then when you want to update the text, call `SetText` on the text block:  
`_textWiget.SetText(SetDynamicText("Dynamic Text!"))`

And then to change a wiget’s visibility, call `SetVisibility` on your canvas:

```auto
_canvas.SetVisibility(widget_visibility.Visible)
_canvas.SetVisibility(widget_visibility.Hidden)

```

---

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [August 10, 2023, 6:48pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/6 "2023-08-10T18:48:21Z")

</div>

That’s great but I don’t know how to call it on my script. do I make an @editable and call it like that

---

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [August 10, 2023, 7:13pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/7 "2023-08-10T19:13:55Z")

</div>

Here is an example:

> [@Quick way to display text to player's screen from Verse script](https://forums.unrealengine.com/t/quick-way-to-display-text-to-players-screen-from-verse-script/831948/5):
>
> Here is an example of displaying dynamic text on the screen, changing a value, and updating the text. using { /Verse.org/Simulation } using { /Verse.org/Colors } using { /Fortnite.com/Devices } using { /Fortnite.com/UI } using { /UnrealEngine.com/Temporary/Diagnostics } using { /UnrealEngine.com/Temporary/SpatialMath } using { /UnrealEngine.com/Temporary/UI} dynamic\_text\_device := class(creative\_device): var \_myIntValue:int = 0 var \_textWiget: text\_block = text\_block{DefaultTextCo…

---

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [August 10, 2023, 10:19pm UTC](https://forums.unrealengine.com/t/how-do-i-set-text-blocks-visible-and-how-can-i-change-their-text-in-verse/1256196/8 "2023-08-10T22:19:40Z")

</div>

I understand the code but what I don’t understand is how do i define it. Do i just do \_textWidget (replace that with text block bame) or do i need to do anything else before that
