The viewmodel can be seen falling behind when I spin around my camera, how would I fix this?
Code is not the fanciest as I’m just testing around and prototyping basically.
local vm = script:WaitForChild("VMReference"):Clone()
vm.Parent = workspace.CurrentCamera
local hrp = vm.PrimaryPart
game:GetService("RunService"):BindToRenderStep('vm', Enum.RenderPriority.Camera.Value, function()
vm:PivotTo(workspace.CurrentCamera.CFrame - (hrp.CFrame.UpVector.Unit * 1.5))
for _,v in pairs(vm:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide = false
end
end
end)