Lua: converting from float to int May 20, 2023 by Tarik You could use math.floor(x) From the Lua Reference Manual: Returns the largest integer smaller than or equal to x.