This code is working just fine but I am wondering it there could be a function that has parameter or arguments to make this have less lines.
NOTICE: I'm pretty much repeating the code but some things a different.
while true do
local canFade = true
for i = 0,1,.001 do
cam.CFrame = cam1.CFrame:lerp(cam2.CFrame,i)
game:GetService('RunService').RenderStepped:wait()
if i >= .98 and canFade then
canFade = false
fade(playerGui:FindFirstChild('Main').FadeBackground)
end
end
local canFade = true
for i = 0,1,.001 do
cam.CFrame = cam3.CFrame:lerp(cam4.CFrame,i)
game:GetService('RunService').RenderStepped:wait()
if i >= .98 and canFade then
canFade = false
fade(playerGui:FindFirstChild('Main').FadeBackground)
end
end
local canFade = true
for i = 0,1,.001 do
cam.CFrame = cam5.CFrame:lerp(cam6.CFrame,i)
game:GetService('RunService').RenderStepped:wait()
print'c'
if i >= .98 and canFade then
canFade = false
fade(playerGui:FindFirstChild('Main').FadeBackground)
end
end
local canFade = true
for i = 0,1,.001 do
cam.CFrame = cam7.CFrame:lerp(cam8.CFrame,i)
game:GetService('RunService').RenderStepped:wait()
if i >= .98 and canFade then
canFade = false
fade(playerGui:FindFirstChild('Main').FadeBackground)
end
end
local canFade = true
for i = 0,1,.001 do
cam.CFrame = cam9.CFrame:lerp(cam10.CFrame,i)
game:GetService('RunService').RenderStepped:wait()
if i >= .98 and canFade then
canFade = false
fade(playerGui:FindFirstChild('Main').FadeBackground)
end
end
end

3 comments
yes...
Ok, I will try then.
Yes, b/c you wont have to keep rewriting over-and-over. That's one of the powers of lua! >>:D