So I am making a gun and I am in the final stages of development. The only thing that I really really need is an aiming animation. I cannot for the life of me figure out how to do it. I could do it the last time I made a gun, and now I can't. Things To Know
- I have the arms welded to the head (so that they will move up and down relatively with the mouse)
- I have the fake arms welded to the regular arms.
- I also have the head welded to the torso to prevent the default animations from happening.
Code for the arm weld and head weld:
local function Weld()
if not ArmsWelded and Player ~= nil then
ArmsWelded = true
LeftShoulder.Part1 = nil
RightShoulder.Part1 = nil
RWeld = Instance.new('ManualWeld', RightArm)
RWeld.Part0 = Head
RWeld.Part1 = RightArm
RWeld.C1 = CFrame.new(-0.9, 0.05, -1) * CFrame.Angles(math.rad(-90), math.rad(-16), math.rad(0))
LWeld = Instance.new('ManualWeld', LeftArm)
LWeld.Part0 = Head
LWeld.Part1 = LeftArm
LWeld.C1 = CFrame.new(0.4, 0.85, -1.1) * CFrame.Angles(math.rad(-90), math.rad(-325), math.rad(5))
if not HeadWelded then
HeadWelded = true
HWeld = Instance.new('ManualWeld', Head)
HWeld.Part0 = Torso
HWeld.Part1 = Head
HWeld.C0 = CFrame.new(0, 1.5, 0)
end
end
end
Code for the fake arms:
local function CreateArms()
if not ArmsCreated and S.FakeArms then
ArmsCreated = true
ArmModel = Instance.new('Model', CurrentCam)
ArmModel.Name = 'FakeArms'
--Right
RArm = RightArm:Clone()
RArm.Material = 'SmoothPlastic'
RArm.Transparency = S.ArmTransparency
RArm.BrickColor = S.ArmColor
local rightMesh = Instance.new('BlockMesh', RArm)
rightMesh.Scale = Vector3.new(0.65, 0.99, 0.65)
local rightWeld = Instance.new('ManualWeld', RightArm)
rightWeld.Part0 = RightArm
rightWeld.Part1 = RArm
RArm.Parent = ArmModel
--Left
LArm = LeftArm:Clone()
LArm.Material = 'SmoothPlastic'
LArm.Transparency = S.ArmTransparency
LArm.BrickColor = S.ArmColor
local rightMesh = Instance.new('BlockMesh', LArm)
rightMesh.Scale = Vector3.new(0.65, 0.99, 0.65)
local rightWeld = Instance.new('ManualWeld', LeftArm)
rightWeld.Part0 = LeftArm
rightWeld.Part1 = LArm
LArm.Parent = ArmModel
end
end
Thanks for the help guys. If you have anything you could tell me that might help I would greatly appreciate it.

2 comments
I get how the arm is like that, but when I try to edit the weld it won't work.
What do you mean? Just edit the c0 of the right shoulder