Help with camera follow delay

so, im trying to make a camera similar to AoT games like this:

--Services
local userInputService = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

--Player & Character
local plr = game:GetService("Players").LocalPlayer
local Character = plr.Character or plr.CharacterAdded:Wait()
local hum = Character:WaitForChild("Humanoid")
local hrp = Character:WaitForChild("HumanoidRootPart")

--Other
local Camera = game:GetService("Workspace").CurrentCamera

function Update()
    TweenService:Create(hum, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CameraOffset = (hum.MoveDirection) * 2}):Play()
    
    if hum.MoveDirection.Magnitude <= 0 then
        TweenService:Create(hum, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CameraOffset = (Vector3.new(0,0,0))}):Play()
    end
end



runService.RenderStepped:Connect(Update)

I made it like this, but the problem is that hum.MoveDirection is relative to the world causing this effect:
walking to west:


walking to east:

can someone help me?

1 Like

Oh nvm i misread i see u are changing cameraoffset not cframe. Ok so maybe u should change the x value of camera offset to be a minus which inverts it. IGNORE ALL MY PREVIOUS MESSAGES

1 Like