Converting a position into integers

Let’s say I printed my Torso’s position, it would show up as something like 35.121347, 64.2389427, 104.12839479. What I want to print out would be 35, 64, 104, without the decimals. What type of string manipulation would I use?

I think what you are looking for is math.floor.

You’d need to probably make a function that has a position as a parameter that prints a rounded number of the XYZ coordinates as I don think there’s a built in way to do that since it prints the position exactly where it is located

local function noDecimals(position)
    print(math.round(position.X), math.round(position.Y), math.round(position.Z))
end

print(noDecimals(Torso.Position))
3 Likes