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

How to fix Animate-script, I tried fixing it, it wont work?

Asked by 8 years ago

When I move the crosshair with the weapon equipped near my character, it glitches the arms to fling around the player, not like fly the arms okay fyi. Look below for an example of what I did:

weld1.C1 = CFrame.new(-0.4+1.5, 1, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(310), 0, math.rad(-100))
weld2.C1 = CFrame.new(-1, -0.2, 0.35-1.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
    mouse.Move:connect(function ()
        --local Direction = Tool.Direction.Value 
        local Direction = mouse.Hit.p
        local b = head.Position.Y-Direction.Y
        local dist = (head.Position-Direction).magnitude
        local answer = math.asin(b/dist)
        neck.C0=orginalC0*CFrame.fromEulerAnglesXYZ(answer,0,0)
        wait(0.1)
    end)
end

Answer this question