So, I'm working on an FPS engine, but I'm stuck on getting the fake arms to weld to the player and appear in the camera. I do not know what I'm doing wrong but I need some real help. The two fake arms are unions. One union for each arm. They are called Left Arm and Right Arm. They are currently in a model in the lighting called gear. Here's what I have:
local player = game.Players.LocalPlayer
local character = player.Character
local camera = workspace.CurrentCamera
local arms = {character['Right Arm'], character['Left Arm']}
local welds = {}
local localarms = {}
local gear = game.Lighting.gear:clone()
gear.Parent = camera
localhead = character.Head:clone()
localhead.Size = Vector3.new(.2, .2, .2)
localhead.Name = 'Head_'..player.Name
localhead.Parent = game.Workspace.storage
localhead.Transparency = 1
localhead:BreakJoints()
headweld = Instance.new('Weld', localhead)
headweld.Part0 = character.Head
headweld.Part1 = localhead
local localarm1 = arms[1]:clone()
table.insert(localarms, localarm1)
local localarm2 = arms[2]:clone()
table.insert(localarms, localarm2)
welds[5].Parent = gear.Handle
welds[5].Part0 = localarms[2]
welds[5].Part1 = gear.Handle
welds[5].C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(90), 0, 0)
welds[6].Parent = arms[1]
welds[6].Part0 = localhead
welds[6].Part1 = arms[1]
welds[6].C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), 0, 0)
welds[7].Parent = arms[2]
welds[7].Part0 = localhead
welds[7].Part1 = arms[2]
welds[7].C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-93), math.rad(45), 0)
player.CameraMode = 'LockFirstPerson'
I really hope that someone can help me fix this. Thank you!
