Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To remove more 0.0153252 digets on a Velocity display in a textlabel?

Asked by
hokyboy 270 Moderation Voter
4 years ago
while true do
    wait(0.25)
script.Parent.Text = game.Workspace.VehicleSeat.Velocity.X
end

I hate how it displays like 25.2562349856236892304643687436878476436 how can i get this down to only 25?

0
C'mon, everyone loves precise numbers. SuperPoopyPoopPoop 21 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

math.floor

math.floor will round any number down, meaning 25.9 will be 25 and 25.5 will be 25.

However, math.roof will round any number up.

0
Isn't math.round and math.floor the same? Igoralexeymarengobr 365 — 4y
0
math.round doesn't exist. Styre_x 2 — 4y
Ad

Answer this question