local l1 = script.Parent.o
local l2 = script.Parent.t
local l3 = script.Parent.th
local l4 = script.Parent.f
local l5 = script.Parent.fi
repeat
for n = 1, 5 do
end
until script.Parent.on.Value == 0
So I wanted to simplify my code using a for loop. Is it possible to have the n in the for loop combine with a l at the start to get the local variables at the top of the code. So I could repeat the code 5 times where it would apply the properties to l1 l2 l3 l4 and l5.
Apologies if I haven't explained very well.

2 comments
Thank you very much. I'll probably use arrays in the future alongside some other scripts. And thanks for the reminder of the wait()
I strongly suggest using an event for this rather than a loop.