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

Why is this torso following mouse script glitchy?

Asked by 7 years ago
Edited 7 years ago

Hello, I have made this script for my gun project I am creating and this part of the script is not really working the way I am wanting it to. It is making my arms all glitchy when I am in first person mode and I wish it was smooth but I don't know why it is doing this. Oh and when I say "glitchy" I mean when I walk around and move my mouse it starts to twitch. Can anyone help me please?

mouse.Move:connect(function()
        mouse.TargetFilter = workspace
        torso.CFrame = CFrame.new(torso.Position, Vector3.new(mouse.Hit.p.X, mouse.Hit.p.Y, mouse.Hit.p.Z))
        torso.Neck.C1 = CFrame.new()
        torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((mouse.Hit.p - mouse.Origin.p).unit.y), 0, 0)
    end)
1
Define "glitchy" Warfaresh0t 414 — 7y
0
Sorry, I edited it. Its like twitching I guess. 951753lolguy 2 — 7y

Answer this question