How to make a smoother transition?

I am currently making a script that changes the camera’s FieldOfView property. At the moment this is what i made:

https://gyazo.com/75ba2163ae49e67d6b68ba0233c2c2a1

I was wondering how i could do a smoother transition with the FOV.

2 Likes

You can use TweenService to achieve a smoother kind of style!

1 Like

Do you have any recommendations on how to use it? I’ve never used TweenService for things like this, only UIs.

You can read about Customizing the Camera | Roblox Creator Documentation and TweenService | Roblox Creator Documentation at the Developer Hub. They have pretty analytic examples and will definately help you with your situation.

1 Like

Just call this function when you want to

local tweenSpeed = 1 --how fast it takes to tween, can be a decimal
local camera = game.Workspace.Camera
local function TweenCamera(Goal)
       game:GetService("TweenService"):Create(camera, TweenInfo.new(tweenSpeed), {FieldOfView = goal}):Play()
end
1 Like