Is it possible to make a for i loop run only thrice? If so, how? (I'm new to scripting)

Heyaa fellow devs, so I’m trying to make this for i loop run only thrice but I haven’t really found any sources that tell how to do so and I’m very new to scripting, any help would be greatly appreciated.

My for i loop script:

for i , v in pairs (orbs:GetDescendants()) do
				if v:IsA("BasePart") or v:IsA("Part") and v.Name ~= "PrimaryPart" then
					wait(2)
					part.CFrame = CFrame.new(part.Position, v.Position)
					local orbzoomtween = ts:Create(part, TweenInfo.new(2), {Position = v.Position})
					orbzoomtween:Play()
			end
			end
for i , v in pairs (orbs:GetDescendants()) do
				if v:IsA("BasePart") or v:IsA("Part") and v.Name ~= "PrimaryPart" then
					wait(2)
					part.CFrame = CFrame.new(part.Position, v.Position)
					local orbzoomtween = ts:Create(part, TweenInfo.new(2), {Position = v.Position})
					orbzoomtween:Play()
			
            if i >= 3 then break end
             end
			end

2 Likes