Flying away bcz of viewmodel

hi yall, today im making viewmodel, all is ok until i attached viewmodel cframe to camera cframe,
here the code:

local viewmodel = game.ReplicatedStorage.view_model:Clone()
viewmodel.HumanoidRootPart.CFrame = game.Workspace.CurrentCamera.CFrame
viewmodel.Parent = game.Workspace.CurrentCamera

local hoint = Instance.new("Motor6D")
hoint.Part0 = viewmodel.HumanoidRootPart
hoint.Part1 = game.Players.LocalPlayer.Character:FindFirstChild("Head")
hoint.Parent = viewmodel.HumanoidRootPart
hoint.Name = "hointy"

local anim = script.idle
viewmodel.Humanoid:FindFirstChildOfClass("Animator"):LoadAnimation(anim):Play()

game:GetService("RunService").RenderStepped:Connect(function()
	viewmodel.HumanoidRootPart.CFrame = game.Workspace.CurrentCamera.CFrame
end)

and here is video of problem:

(sorry for low quality just recording from roblox)

Set the parts in your viewmodel to cancollide off

i already set cancollide false and make another collision group but still same result.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.