Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to see if a number through another number, in an if statement? (Answered)

Ok, my question doesn't make a lot of sense, Ill explain it better. So I want to do if number == this number through this number then it does whatever. I tried using - but it just thinks its subtracting. Is there a symbol I can use for this? Because I dont want to do 1 or 2 or 3 or etc... My failing code

if number == 1 - 75 then
			print (number)
		end

3 comments

0

so basically you want the range of what the number is in

0

Yes

0

I want the if statement to see if its a certain number through a certain number

1 answer

Someone showed me I could use greater than or equal to, and less than or equal to. Code:

if number >= 1 and <= 4 then
--code
end

This discussion is preserved as it was. New answers, comments, and votes are closed.