[Solved] How do I only change part of a text object?

I’m new to Gdevelop and I’m trying to make a game about potatoes, I’m made a text object which displays “You have X Potatoes” (X being the number of potatoes you have). I don’t understand how to change the text so that the X is a number variable, I already have the number variable adding 1 every second, but I don’t know how to replace X with it without changing the rest of the text. Please help, thanks!
image

1 Like

Modify text set to “You have " + variable(X) + " potatoes.”

Oh I forgot, when you start writing your variable it will ToString it.

4 Likes

Thank you for the reply! :smiley: I’ll try the code out!

2 Likes

Alright just get back to us if it doesn’t work.

1 Like

It worked, :smiley: Thank you so much!

2 Likes