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

i got my tool to follow my mouse's y axis, but it only goes on direction?

Asked by
wookey12 174
6 years ago

On my last question, i made a script where it made my arm go crazy instead of following my mouse. someone gave me some code. i tweaked it to fit my game, and it doesn't work. i tested it in a different game, and it did. the reason to this is because i have shift lock permanently on. s there any way to get around this? code:

local previousY = mouse.Y
mouse.Move:connect(function()
    local delta = mouse.Y - previousY
    previousY = mouse.Y

    if delta > 0 then
        player.Torso["Right Shoulder"].C0 = 
            player.Torso["Right Shoulder"].C0 *
            CFrame.Angles(0,0,mouse.Y/2000)
    elseif delta < 0 then
        player.Torso["Right Shoulder"].C0 = 
            player.Torso["Right Shoulder"].C0 *
            CFrame.Angles(0,0,-mouse.Y/2000)
    end
end)

Answer this question