Why does changing the rotation of the arm affect the position of it?
Asked by
4 years ago Edited 4 years ago
I'm trying to make the arm point towards the mouse, but when I run the game, the arm goes flying whenever I move the mouse. I didn't change the position of the arm, so why does it do this?
Here's the code:
1 | local RS = script.Parent.RightUpperArm [ 'RightShoulder' ] |
2 | local mouse = game.Players:GetPlayerFromCharacter(script.Parent):GetMouse() |
4 | game:GetService( 'RunService' ).RenderStepped:Connect( function () |
7 | RS.C 0 = CFrame.new(RS.Parent.RightShoulderRigAttachment.OriginalPosition.Value - mh) |
This is a local script and inside StarterCharacterScripts btw.