How to get all Multiples of a certain number with coding

i need this for my leveling up system so for example how to get all Multiples of 5
like 10 15 20 25 30 so on effectively without making a massive table anybody have any idea

i mean this is to time consuming

local multi = {5,10,15,20,25} – so on

can you just represent it was x*5? makes any number a linear scalar of 5

I mean, you could still use tables, but automate it using something like this…

local multiples = {}

task.spawn(function()
while true do
multiples[#multiples + 1] = multiples[#multiples] + 5
task.wait(0.5)
end
end)

Probably a bad coding practice though… but it uses tables!

edit: i almost crashed your game by not adding a wait

edit2: I would also highly recommend adding an endpoint so it doesn’t do a lot of math forever for no reason.

local multiplesOfFive = {}

task.spawn(function()
	for i = 5, math.huge, 5 do
		table.insert(multiplesOfFive, i)
		task.wait()
	end
end)

Although this seems highly unnecessary, if you need to determine if a number is divisible by five with no remainder then use the modulo operator, i.e;

if number % 5 == 0 then