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

FPS Arms. How do I do this?

Asked by 9 years ago

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.

01Tool = script.Parent
02local User
03arms = false
04player = game.Players.LocalPlayer
05repeat wait() until player.Character
06save = player.Character.Torso["Left Shoulder"]:Clone()
07Tool.Equipped:connect(function()
08    User = Tool.Parent
09    if arms == false and player ~= nil then
10        User.Torso["Right Shoulder"].C0 = CFrame.new(.6,.2,0) * CFrame.Angles(0,math.rad(90),math.rad(0))
11        User.Torso["Left Shoulder"].C0 = 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
View all 50 lines...

Answer this question