I keep getting the following error 01:45:39.129 - CFrame is not a valid member of Model

This is from the following code, not sure what the error is?

local frequency = 1
local amplitude = 12
local part = game.Workspace:WaitForChild("Trying")
local adding = 0.05
while wait() do
local angle = math.cos(time())/160
part.CFrame = part.CFrame + Vector3.new(0, math.sin(time() * frequency) * amplitude/100, adding)
local newAngle = part.CFrame * CFrame.fromEulerAnglesXYZ(angle, 0, 0)
part.CFrame = newAngle
end

The message is straightforward: models do not have a CFrame property. You can give your model a PrimaryPart if it doesn’t have one already and use Model::SetPrimaryPartCFrame

local frequency = 1
local amplitude = 12
local part = game.Workspace:WaitForChild("Trying")
local adding = 0.05
while wait() do
local angle = math.cos(time())/160
part:SetPrimaryPartCFrame(part:GetPrimaryPartCFrame() + Vector3.new(0, math.sin(time() * frequency) * amplitude/100, adding))
local newAngle = part:GetPrimaryPartCFrame() * CFrame.fromEulerAnglesXYZ(angle, 0, 0)
part:SetPrimaryPartCFrame(newAngle)
end