How to shake Camera when CameraSubject is a part?

So I am trying to make a camera shake when an event is fired. The script I am using works when the CameraSubject is a humanoid, however I put it as a part as it follows a ship model. Because of this, “CameraOffset” does not exist under the part so I am wondering if there is another way to make the camera shake.

I have tried putting a humanoid as a child of the part and setting it as the CameraSubject, but it doesn’t work. Here is the script:

local Player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")

local Folder = game.Workspace.Ships:FindFirstChild(Player.Name)
local Camera = Folder.Ship.CamPart

function ShakeCamera()
	local now = tick()
	local bobbleX = math.cos(now * 9) / 6
	local bobblyY = math.abs(math.sin(now * 12)) / 3
	
	local bobble = Vector3.new(bobbleX, bobblyY, 0) * 5
	Camera.CameraOffset = Camera.CameraOffset:Lerp(bobble, .25)
end

game.ReplicatedStorage.Cannons.Fire.OnClientEvent:Connect(function(isShaking)
	if isShaking then
		RunService:BindToRenderStep("CameraShake", Enum.RenderPriority.Camera.Value + 1, ShakeCamera)
	else
		RunService:UnbindFromRenderStep("CameraShake")
	end
end)

Any help would be appreciated, thank you :).

I’ve made some modifactions and managed to make the script work.

local Player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")

local Folder = game.Workspace.Ships:FindFirstChild(Player.Name)
local Camera = Folder.Ship.CamPart

local CC = game.Workspace.CurrentCamera

function ShakeCamera()
	local now = tick()
	local bobbleX = math.cos(now * 9) / 6
	local bobblyY = math.abs(math.sin(now * 12)) / 3

	local bobble = Vector3.new(bobbleX, bobblyY, 0) * 5
	CC.CFrame = Camera.CFrame:Lerp(CFrame.new(bobble), .25)
end

game.ReplicatedStorage.Cannons.Fire.OnClientEvent:Connect(function(isShaking)
	if isShaking then
		RunService:BindToRenderStep("CameraShake", Enum.RenderPriority.Camera.Value + 1, ShakeCamera)
	else
		RunService:UnbindFromRenderStep("CameraShake")
	end
end)

Hello, sorry for the long response time. I have replaced the script with that one and this now happens: