Does anybody here know how to add a Walking sway?

The following code already has a Camera Sway system as my friend provided it for me Thank you friend if your reading this!

All it needs is a Walking sway, like if you walk. Your viewmodel moves (Just like Phantom Forces)

**CODE:**

```
local viewmodel = game.ReplicatedStorage.Viewmodels.Viewmodel:Clone() -- You will need your viewmodel here
viewmodel.Parent = workspace
local lastCamCFrame = CFrame.new()
local swayCFrame = CFrame.new()
workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function()
local rotation = workspace.CurrentCamera.CFrame:ToObjectSpace(lastCamCFrame)
local X, Y, Z = rotation:ToOrientation()
swayCFrame = swayCFrame:Lerp(CFrame.Angles(math.sin(X) * 0.7, math.sin(Y) * 0.7, 0), 0.1)
lastCamCFrame = workspace.CurrentCamera.CFrame
viewmodel.CameraBone.CFrame = workspace.CurrentCamera.CFrame * swayCFrame
end)
```