![]()
I want to remove the multiple useless characters shown after the period.
Number on the left side of the ‘/’.
![]()
I want to remove the multiple useless characters shown after the period.
Number on the left side of the ‘/’.
You can use the math library for it.
math.floor(x) rounds down a number, 1.8 being 1
math.ceil(x) rounds up a number, 1.8 being 2
math.round(x) rounds a number, 1.8 being 2
Or if you would like to keep a decimal, you can do string.format("%.1f", num).
I will most likely end up using math.round(x), can you show me an example of how I will be able to use it?
Yeah?
Label.Text = Sound.TimePosition .. '/' .. math.round(Sound.TimeLength)
Ah alright, thank you for this.