How to round numbers

You can write your topic however you want, but you need to answer these questions:
i want to make my meter Counter Round the numbers

i used math.Round, math.ceil, math.floor but result is still the same

i tried looking into other dev forum posts, dev hub, Youtube e.t.c nothing helped

Video Link:
[Screen Capture 20.07.2023, 23.04.27]

while wait() do
	local player = game.Players.LocalPlayer
	local character = player.Character or player.CharacterAdded:Wait()
	
	local Meter_Counter = script.Parent.Screen.meterCounter
	
	Meter_Counter.Text ="meters: "..math.round(character:GetPivot().Position.Y-4) * 0.28
end

None of this is in a math.round. You’re using math.round to round the first part, but then you multiply that by 0.28. In almost every case, that will just make it a decimal again.

3 Likes

What’s the best way to use math.round? And when should I use it?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.