Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my head in game is literally sinking? [ok pls solve problem now]

Asked by 4 years ago
Edited 4 years ago

Howdy, today I've been dealing with this goddamn annoying script trying to figure out what the frick has been going on.

PROBLEM

The head seems to sink everytime i move the mouse which is the thing I'm trying to avoid.

SCRIPT

01local Player = game.Players.LocalPlayer
02local Character = Player.CharacterAdded:wait() ; Character = Player.Character
03    local Torso = Character:WaitForChild"Torso"
04    local Neck = Torso:WaitForChild("Neck")
05 
06    local Humanoid = Character:WaitForChild("Humanoid")
07    local HMR = Character:WaitForChild("HumanoidRootPart")
08 
09    local Mouse = Player:GetMouse()
10 
11    local NeckC0 = Neck.C0
12    local NeckC1 = Neck.C1
13 
14    Mouse.Move:Connect(function()
15        for i = 0,1,.01 do
16        Neck.C1 = NeckC1:Lerp(CFrame.Angles(math.rad(Mouse.X), math.rad(Mouse.Y), 0), i)
17        wait()
18    end
19    end)

Answer this question