I'm making this custom health detector, the problem is that it only mention specific numbers like 100, 80, 60, etc. so when the player reach numbers like 28, 85, 50, etc. it won't count because the numbers only jump to the mentioned numbers and won't range to the other numbers. is there some way to range the numbers like 100-81? please help!

if health == 100 then
    healthcolor.ImageColor3 = Color3.new(0,255,0)
    textbox.Text = 5
end

7 comments

0

Please elaborate, I don't understand what your actual problem is...

0

how do i range numbers from 100-81, 80-61, etc? mentioning the numbers 1-1 is time consuming

0

by mentioning them you mean in an if statement?

0

yes, In the script the number is 100, how do I make the script mention from 100 to 81 without mentioning them 1 by 1?

0

if health >= 81 and health <=100 then --do stuff end

1

that is just an example but if you need to know more about relational operators: https://www.lua.org/pil/3.2.html

0

thanks a lot