With my FPS game, I'm trying to create fake arms and slap them into the player's camera just like it's done in both Phantom Forces, and Strike. I've taken code from several different scripts since my own wouldn't work, yet I still cannot figure out how to get two fake arms to weld to the player's body. In the lighting, there is a model called Arms and in the model are two unions. Left Arm and Right Arm. I need help getting this thing to work.
wait(1)
Player = game.Players.LocalPlayer
Character = Player.Character or Player.CharacterAdded:wait()
Humanoid = Character:WaitForChild("Humanoid")
Head = Character:WaitForChild("Head")
Torso = Character:WaitForChild("Torso")
Neck = Torso:WaitForChild("Neck")
RightArm = Character:WaitForChild("Right Arm")
LeftArm = Character:WaitForChild("Left Arm")
RightShoulder = Torso:WaitForChild("Right Shoulder")
LeftShoulder = Torso:WaitForChild("Left Shoulder")
RootPart = Character:WaitForChild("HumanoidRootPart")
print(Neck.C1)
Camera = workspace.CurrentCamera
local FakeArms
function MakeWeld(p0, p1, c0, c1)
local w = Instance.new("Weld", p0)
w.Part0 = p0
w.Part1 = p1
w.C0 = c0 or CFrame.new()
w.C1 = c1 or CFrame.new()
return w
end
function MakeFakeArms()
FakeArms = Instance.new("Model", Camera)
local FL = LeftArm:Clone()
FL.FormFactor = "Custom"
FL.Size = Vector3.new(.8, 3, .8)
local FLW = MakeWeld(FL, LeftArm)
FLW.C0 = CFrame.new(0, -0.5, 0.1)
local FR = RightArm:Clone()
FR.FormFactor = "Custom"
FR.Size = Vector3.new(.8, 3, .8)
local FRW = MakeWeld(FR, RightArm)
FRW.C0 = CFrame.new(0, -0.5, 0)
FL.Parent = FakeArms
FR.Parent = FakeArms
local fh = Instance.new("Humanoid")
fh.Sit = true
fh.Parent = FakeArms
local s = Character:FindFirstChild("Shirt")
if s then
s:Clone().Parent = FakeArms
end
end
