# Setting the text of the same text\_block from different devices 

**URL:** <https://forums.unrealengine.com/t/setting-the-text-of-the-same-text-block-from-different-devices/2419636>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [March 26, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/setting-the-text-of-the-same-text-block-from-different-devices/2419636 "2025-03-26T19:55:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipexy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Felipexy](https://forums.unrealengine.com/u/Felipexy)\
**Post date:** [March 26, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/setting-the-text-of-the-same-text-block-from-different-devices/2419636/1 "2025-03-26T19:55:50Z")

</div>

I have a device called CurrencyManager. It has a function called UpdateCurrencyUI.

```auto
    UpdateCurrencyUI(): void=
        SavedPlayerCurrencies := PersistenceManager.GetPlayerStats(Player)
        set Currencies = SavedPlayerCurrencies.Currencies

        for (Index -> Currency : Currencies):
            CurrencyValue := Currency.Value * 1.0
            if (TextBlock := TextBlocks[Index]):
                Print("TextBlock found")
                TextBlock.SetText(MakeRoundedMessage(CurrencyValue))

```

When I call this function from the CurrencyManager device, it works perfectly as it has created the TextBlocks array with the Initialization() function. When I call it from my other device called CosmeticShopDevice it doesn’t. It won’t print the “TextBlock found” as the TextBlocks array appears to not exist in this instance.

```auto
    if (Price <= Currency.Value):
        if:
            OldData := PlayerStatsMap[Player]

            var PlayerCurrencyMap : [player]Player_Currency = map{}

            set PlayerStatsMap[Player] = player_stats_table{
                MakePlayerStatsTable<constructor>(OldData)
                OwnedCosmetics := OldData.OwnedCosmetics + array{CosmeticIndex}
                EquippedCosmetics := OldData.EquippedCosmetics + array{CosmeticIndex}
            }

            not PlayerCurrencyMap[Player]
            set PlayerCurrencyMap[Player] = Player_Currency{Player := Player}
            PC := PlayerCurrencyMap[Player]
            
        then:
            PC.SpendCurrency(CurrencyIndex, Price)
            Item.VFXPowerup.Pickup(Player)

```

If I call the PC.Initialization() method it will print “TextBlock found” but it seems that it creates a new TextBlocks array that is not the same, so it sets the text of a text\_block that is not being displayed on screen. How can I solve this?

Thank you so much!
