Loop inside another loop plays only once

Hi,

So i wanted to make script that will crate parts in order so i don’t need to make it manually.

Heres the script:


local currentName = 58
local current = 58

for r = 1, 10 do
	if  current ~= 58 then
		current = current + 58
	end
	local currentI
	if r == 1 then
		currentI = 1
	else
		currentI = current + 1
	end
	print(r) --prints 10 times as it should
	for i = currentI, current do
		print("Yey") --prints 58 times, but it should print it around 580 times since loop r should do it 10 times
		local temp = game.Workspace.Plot1["C"..i]:Clone()
		currentName = currentName + 1
		temp.Position = temp.Position - Vector3.new(0,0,1.13)
		temp.Name = "C"..currentName
		temp.Parent = game.Workspace.Plot1
	end
end

The problem is that loop r should do loop i that will create line 10 times, loop r do 10 times, but loop i only work first time. Why this happen?

Oh, my bad, the problem is that i make curretI bigger by 1 than current thats why loop don’t even start.