How to make subtle zoom out camera effect

in PLS DONATE they have a lil zoom out camera animation when you open a ui and it zooms in back to where it was when you close the ui. how do i make this for my ui? thank you so much for any help :+1::+1:

This is probably a combination of TweenService and the players Camera.FieldOfView. An implementation could look like this:

local TweenService = game:GetService("TweenService")

-- Default FOV on Roblox places is 70
local camera = workspace.CurrentCamera
local DEFAULT_FOV = camera.FieldOfView

-- Tweens
local tweenInfo = TweenInfo.new(0.2)
local tweenIn = TweenService:Create(camera, tweenInfo, {
    FieldOfView = 60
})
local tweenOut = TweenService:Create(camera, tweenInfo, {
    FieldOfView = DEFAULT_FOV
})

And then, you can use the two tweens when the player open or closes a UI:

-- When you open a UI:
tweenIn:Play()

-- When you close a UI:
tweenOut:Play()
3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.