Need help with tweening cameras using tween service

  1. What do you want to achieve? Keep it simple and clear!
    I want to zoom out the player’s screen using tween service, kinda like when in a horror game when you are being chased so then the camera zooms out, but the camera still moves with the player.

  2. What is the issue? Include screenshots / videos if possible!
    I just can’t find a solution for this, is there any way I can achieve this.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I also looked at the dev forums camera for the player post but my solution wasn’t there.

Note: I am young so I might’ve missed a post about this or put this on the wrong category, apologies if I do this.

1 Like

Tween the camera fov

localscript:

local Tweens = game:GetService("TweenService")
local camera = workspace.CurrentCamera

function TweenFOV(fov)
  local info = TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out) -- tweeninfo for effects

  local Goal = {} -- Properties of the camera we want to change
  Goal.FieldOfVision = fov 

  local tween = Tweens:Create(camera,info,Goal)
  tween:Play()
end

TweenFOV(110) --110 FOV when running or something

You can write it in any way you want but this is pseudo code so you get a base understanding of how to tween properties. I Highly recommend you read the api article here

1 Like
1 Like