As stated in the title I was wondering how to make smooth camera tweens but also override current tweens? I know for tweening position on GUI objects you can do
local obj = script.Parent obj:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Linear", 1.5, true) wait(1) obj:TweenPosition(UDim2.new(.5, 0, .5, 0), "Out", "Linear", 1)
And after one second it stops and starts tweening to 0.5 x 0.5 scale, the thing is I was wondering if there were ways to do generally the same thing between to camera positions? I've seen games do it before (ex: Mutliple games by Quenty) but I don't understand Camera Manipulation fully even after studying it on the wiki.
Well, there is an Interpolate
method that can be used on the Camera, but the CameraType has to be "Scriptable" before you can call that method. This is basically how you would do it:
Camera.CameraType = "Scriptable" Camera:Interpolate( CFrame.new(), --Replace this with the CFrame of your new CoordinateFrame CFrame.new(), --Replace this with the CFrame of your new Focus 1 --Replace this with the duration of the Interpolation ) Camera.InterpolationFinished:connect(function() --An event that fires once the Camera has finished Interpolating Camera.CameraType = "Custom" --Replace "Custom" with whatever you want the cameratype to be after it's finished Interpolating end)
That's pretty much it! Hope this helped!
Note: For more information on the Camera, click here: Camera