local player = game.Players.LocalPlayer
local Camera = game.Workspace.CurrentCamera
local RunService = game:GetService("RunService")
local Viewmodel = game.ReplicatedStorage.Assets.ViewmodelFolder.Viewmodel:Clone()
Viewmodel.Parent = Camera
local camBone = Viewmodel:WaitForChild("CameraBone")
local offsetPrimary = Viewmodel.PrimaryPart.CFrame:ToObjectSpace(camBone.CFrame)
RunService.RenderStepped:Connect(function()
local target = Camera.CFrame * offsetPrimary:Inverse()
Viewmodel:SetPrimaryPartCFrame(target)
end)