Having a players arms follow the mouse while also playing animations?
I have a script that orients the head to the player's mouse and welds the arms to the head, as well as animations for a gun. Animations work fine when I disable the welding function, but do not work when it is active. Is there any way around this?
1 | script.Parent:WaitForChild( "weldevent" ).OnServerEvent:Connect( function (plr, target, origin, c 1 ) |
2 | plr.Character.Torso.Neck.C 1 = CFrame.new() |
3 | plr.Character.Torso.Neck.C 0 = CFrame.new( 0 , 1.5 , 0 ) * CFrame.Angles(math.asin((target - origin).unit.y), 0 , 0 ) |
torso.Neck is a Motor6d object and weldevent fires whenever a player moves their mouse. A seperate function changes Part0 of left shoulder and right shoulder to the head.