How do I use a for loop to get every number in a value?

Hello! I’m wanting to loop through a IntValue to get the number of objects I need to spawn. Here’s basically how I want to do it:

Say the IntValue is 10. The loop would run 10 times. If it was 5, it would run 5 times, and so on.

Hope I explained it good enough!

local IntValue = script.IntValue
local IntValueNumber = IntValue.Value

for i = 1, IntValueNumber do
  print(i)
  -- do stuff with i
end
1 Like

could you do repeat(IntValueNumber)?