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)