Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to range numbers that aren't mentioned?

Asked by 5 years ago

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
0
Please elaborate, I don't understand what your actual problem is... GoldAngelInDisguise 297 — 5y
0
how do i range numbers from 100-81, 80-61, etc? mentioning the numbers 1-1 is time consuming MArzalAlBuchariZ 33 — 5y
0
by mentioning them you mean in an if statement? GoldAngelInDisguise 297 — 5y
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? MArzalAlBuchariZ 33 — 5y
View all comments (3 more)
0
if health >= 81 and health <=100 then --do stuff end GoldAngelInDisguise 297 — 5y
1
that is just an example but if you need to know more about relational operators: https://www.lua.org/pil/3.2.html GoldAngelInDisguise 297 — 5y
0
thanks a lot MArzalAlBuchariZ 33 — 5y

Answer this question