Hi guys, I feel that the title is self explanatory, but I feel this question is basic but I still cant do it, so any help would be appreciative. I'm making a KDR script:
KDR.Text = ("Kill/Death Ratio: "..(player.PlayerData.Kills.Value/player.PlayerData.Deaths.Value))
Now this works as supposed to, however the number that is given (obviously) is not always a whole number and can sometimes be recurring which is very annoying, so I was wondering if someone can help me round this to 2 decimal places, ~ thx, Bubs
value = 5.6879685 local num = math.floor(value * 100)/100
Its quite simple, multiply it by 100 to move it two decimal places up, math.floor to cut off numbers in the thousandths place and beyond, then move it back two decimal places to its original place