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 3 years ago
Edited 3 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

local Player = game.Players.LocalPlayer
local Character = Player.CharacterAdded:wait() ; Character = Player.Character
    local Torso = Character:WaitForChild"Torso"
    local Neck = Torso:WaitForChild("Neck")

    local Humanoid = Character:WaitForChild("Humanoid")
    local HMR = Character:WaitForChild("HumanoidRootPart")

    local Mouse = Player:GetMouse()

    local NeckC0 = Neck.C0
    local NeckC1 = Neck.C1

    Mouse.Move:Connect(function()
        for i = 0,1,.01 do
        Neck.C1 = NeckC1:Lerp(CFrame.Angles(math.rad(Mouse.X), math.rad(Mouse.Y), 0), i)
        wait()
    end
    end)

Answer this question