# How to change a text style on the fly

**URL:** <https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521>\
**Category:** Phaser 3\
**Created:** [April 11, 2022, 3:31pm UTC](https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521 "2022-04-11T15:31:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martholomeow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/martholomeow/32/6410_2.png) [@Martholomeow](https://phaser.discourse.group/u/Martholomeow)\
**Post date:** [April 11, 2022, 3:31pm UTC](https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521/1 "2022-04-11T15:31:21Z")

</div>

I’m trying to figure out how to change a text style on the fly. I’ve tried just setting a new .style but it doesn’t seem to work. Any idea what I might be doing wrong?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [April 11, 2022, 3:34pm UTC](https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521/2 "2022-04-11T15:34:16Z")

</div>

👋

You can use `setStyle(style)` or any of the individual methods like `setFontSize()`.

---

<div class="post-metadata">

**Author:** ![Martholomeow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/martholomeow/32/6410_2.png) [@Martholomeow](https://phaser.discourse.group/u/Martholomeow)\
**Post date:** [April 11, 2022, 9:23pm UTC](https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521/3 "2022-04-11T21:23:45Z")

</div>

Thanks! I figures it was something simple. It’s been a long time since I worked on my project! 🤣

---

<div class="post-metadata">

**Author:** ![supertommy](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/supertommy/32/2548_2.png) [@supertommy](https://phaser.discourse.group/u/supertommy)\
**Post date:** [April 24, 2022, 4:30pm UTC](https://phaser.discourse.group/t/how-to-change-a-text-style-on-the-fly/11521/4 "2022-04-24T16:30:19Z")

</div>

Yea, this is exactly what I’m doing!
