How Do I Get the Numbers In Between Two Separate Numbers

  1. What do you want to achieve?
    I want to know how to get all of the numbers in between two numbers (e.g., 1 through 100).

  2. What is the issue?
    I cannot get the numbers in between two numbers.

  3. What solutions have you tried so far?
    I looked all over the Developer Hub, but I could not find any solution.

Here is my code:

local X = math.clamp(0, -3.998, 4.001)
local Y = math.clamp(0, 0.131, 13.857)
local Z = math.clamp(0, 32.708, 41.758)

What do you mean? You want like 1 with 100 become 1100?

No, I mean I want to find out how to print() every number in between 1 - 100.

Which are: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99.

You can create a for loop and do something like this:

for k = 1, 100 do
   print(k)
end
1 Like

You could do a for loop

for i = 100, 1, -1 do
Print(i)
end

Sorry if that code was messy, I’m on mobile right now.

1 Like

This will print 100 out, do 100 - 1

Complete code xd

local MinNum = 1
 local MaxNum = 100
 for i = MinNum + 1, MaxNum - 1 do
    print(i)
 end
1 Like