FPS Arms. How do I do this?
So I'm on my way to making a gun. But wait, the guns arms in first person do not look up with the mouse/head. What do I do? Examples are extremely helpful. Below is the weld arm script that I am using. This is my friend's weld arm and it seems a bit messy, so if I need to remake it I will. I have been wanting to know how to do this for the longest time.
04 | player = game.Players.LocalPlayer |
05 | repeat wait() until player.Character |
06 | save = player.Character.Torso [ "Left Shoulder" ] :Clone() |
07 | Tool.Equipped:connect( function () |
09 | if arms = = false and player ~ = nil then |
10 | User.Torso [ "Right Shoulder" ] .C 0 = CFrame.new(. 6 ,. 2 , 0 ) * CFrame.Angles( 0 ,math.rad( 90 ),math.rad( 0 )) |
11 | User.Torso [ "Left Shoulder" ] .C 0 = CFrame.new( 0.1 ,. 2 ,. 7 ) * CFrame.Angles( 0 ,math.rad(- 140 ),math.rad(- 90 )) |
12 | rarm = player.Character:FindFirstChild( "Right Arm" ):Clone() |
13 | larm = player.Character:FindFirstChild( "Left Arm" ):Clone() |
14 | rarm.Parent = game.Workspace.CurrentCamera |
15 | larm.Parent = game.Workspace.CurrentCamera |
18 | rarm.formFactor = "Custom" |
19 | larm.formFactor = "Custom" |
20 | larm.Material = "SmoothPlastic" |
21 | rarm.Material = "SmoothPlastic" |
22 | rarm.Size = Vector 3. new( 0.99 , 1.99 , 0.99 ) |
23 | larm.Size = Vector 3. new( 0.99 , 1.99 , 0.99 ) |
24 | local weld = Instance.new( "ManualWeld" ,rarm) |
25 | weld.Part 0 = player.Character:FindFirstChild( "Right Arm" ) |
27 | local welda = Instance.new( "ManualWeld" ,larm) |
28 | welda.Part 0 = player.Character:FindFirstChild( "Left Arm" ) |
30 | local weldfix = Instance.new( "ManualWeld" ,larm) |
31 | weldfix.Name = "DontTouch" |
32 | weldfix.Part 0 = player.Character:FindFirstChild( "Left Arm" ) |
33 | weldfix.Part 1 = User.Torso |
34 | weldfix.C 0 = CFrame.new( 0 , 0.6 , 0.6 )*CFrame.Angles(math.rad(- 30 ),math.rad( 0 ), math.rad(- 90 )) |
39 | Tool.Unequipped:connect( function () |
42 | save.Parent = User.Torso |
43 | User.Torso [ "Right Shoulder" ] .C 0 = CFrame.new( 1 ,. 5 , 0 ) * CFrame.Angles( 0 ,math.rad( 90 ), 0 ) |
44 | User.Torso [ "Left Shoulder" ] .C 0 = CFrame.new(- 1 ,. 5 , 0 ) * CFrame.Angles( 0 ,math.rad(- 90 ), 0 ) |
45 | save = User.Torso [ "Left Shoulder" ] :Clone() |