Displaying the player's position on the screen during the game

Hello! Please tell me how to display the distance traveled by the player in the runner, without fractions. I tied it to the player’s position on the x-axis. It shows something like this 256.012438834. It should be just 256.

If you don’t want decimals, you can use the expression round or roundto.

Example: Modify Text = toString(round(Variable(Distance)))
This rounds to whole numbers (in text object)
Example: Modify Text = toString(roundto(Variable(Distance)),2)
This rounds to the 2nd decimal point (in text object)

You can also round this within the variable as well.
Example: Variable(Distance) = round(Player.X())
Example: Variable(Distance) = roundto(Player.X(),2)


Thank you! You helped me a lot. Everything is working. I tried binding the text directly to the distance without using a variable. Everything works too. But is it right to do so?

Up to you and what you prefer.
If it works for you then that is all the matters.