How do I shorten a decimal?

Hey guys. I’m making a game and I’m going to make a coordinates system. Problem is, when I get the position from a HumanoidRootPart, it has a bunch of ugly decimals attached. I haven’t written a script yet, but is there a way to shorten a decimal such as the example below -

11.65375 = 11
46.2464 = 46

Any help is appreciated!

Use this: math.floor
You can round it too if you want
x = math.floor(x + .5)

1 Like