Hello, i make a rotaiton system, while player rotation by mouse pos
Сharacter rotated succefy, but head position locked
Help me fix it pls!!
My code:
local Connection
Connection = RS.RenderStepped:Connect(function()
repeat task.wait()
local CurrentMousePos = Vector2.new(Mouse.X,Mouse.Y)
local change = (CurrentMousePos - LastMousePos) / 6.9
Model:SetPrimaryPartCFrame(Model:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(change.X), 0))
LastMousePos = CurrentMousePos
Model.PrimaryPart.Orientation = Vector3.new(0, 0, 0)
until Holded == false or cantoggle == false
Connection:Disconnect()
end)