I am trying to make my head look towards my mouse now I can do that in real life but in Roblox not much. I did got it working but there was a weird offset. and when I did fix the offset… this happens… any ideas?
connection = game:GetService("RunService").RenderStepped:Connect(function()
local _,y,_ = CFrame.new(HRP.Position,Mouse.Hit.Position):ToOrientation()
local x,_,z = HRP.CFrame:ToOrientation()
HRP.CFrame = CFrame.new(HRP.Position)*CFrame.Angles(x,y,z)
local cf = HRP.CFrame:ToObjectSpace(CFrame.new(HRP.Position+Vector3.new(0,1,0),Mouse.Hit.Position))
Neck.C0 = cf*NeckC0
for i,v:BasePart in pairs(Parts) do
v.LocalTransparencyModifier = v.Transparency
end
end)
TL;DR
need help making player head look towards mouse.