I was trying to make an intro thing, and make the camera move around. here is my script. Some reason it didn't work.
c = game.Workspace.CurrentCamera pos1 = CFrame.new(1,1,1) pos2 = CFrame.New(2,3,2) function TweenCam(co, fo, step) c1,f1 = c.CoordinateFrame, c.Focus for 1=-90,90,step do r = math.cos(math.rad(i+1)-1/2) c.CoordinateFrame=CFrame.new(fo.p:lerp(f1, r)) end end wait(1) TweemCam(pos1, pos2, 1)
Please help me and say if i did anything wrong.
You did for 1=90,90,stepdo instead of for i=90,90stepdo
function TweenCam(co, fo, step) c1,f1 = c.CoordinateFrame, c.Focus for i=-90,90,step do r = math.cos(math.rad(i+1)-1/2) c.CoordinateFrame=CFrame.new(fo.p:lerp(f1, r)) end end
I think the rest should work.