Hello, I want to know why my health regeneration goes into decimals and i want to know what i can do to fix it.
It’s how Roblox’s health regeneration script works.
You can:
a) make your own health regen script
b) round the variable in your script that retrieve the health value, like so:
local health = math.floor(character.Humanoid.Health + 0.5)
With code from Autterfly, if you need more performance in the game, you can opt for this instead:
local health = (character.Humanoid.Health + 0.5) - (character.Humanoid.Health + 0.5) % 1