So, I am trying to use two for loops. One iterates through a table, and one is numerical. I want them both to run at the same time, and repeat using a while loop. Here's what I have so far:
spawn(function()
while char do
p1, p2 = char.Torso.Position, floater.Position
local dist = (p1 - p2).magnitude
for i = 0, math.pi * 100, 0.05 do -- numerical
weld.C0 = CFrame.new(3.5 * math.sin(i), math.sin(tick()) * 1.5, 2.5 * math.cos(i))
weld.C1 = CFrame.Angles(math.cos(i), math.cos(i), 0)
s.RunService.RenderStepped:wait()
end
for i, v in pairs(rainbow) do -- table
e.BrickColor = v
end
end
end)
How would I do this?

1 comment
Thank you very much! ^w^