How can I smoothly make camera offset

I’ve got code to make the characters camera move down but like it happens instant and idk how to make it smooth I’ve done it before but forgot how

game.Workspace[localPlayer.Name].Humanoid.CameraOffset = game.Workspace[localPlayer.Name].Humanoid.CameraOffset:lerp(,-2,0), .10)
1 Like

Hey @Ie_fishe, first of all l hate your name :slight_smile:

Okay so what you’re looking for is a Tween!

So here’s what that code looks like:

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local TweenService = game:GetService("TweenService")

function ChangeCameraOffset(Offset) -- [Vector3]Offset
    if not Character then Character = Player.Character or Player.CharacterAdded:Wait() end
    local Humanoid = Character:WaitForChild("Humanoid")
    local Tween = TweenService:Create(Humanoid,, {CameraOffset = Offset})

ChangeCameraOffset(, -2, 0))

Hope this helps!


What do I put in for Camera offset? And what do I put in for = Offset?