function armCreation(lArm,rArm)
local ArmGroup = workspace:FindFirstChild("ArmGroup")
parent = lArm.Parent.Name
arms = ArmGroup[parent]:GetChildren()
for i,v in pairs(arms) do
v:Destroy()
end
fakeLeftArm = lArm:Clone()
fakeRightArm = rArm:Clone()
fakeLeftArm.BottomSurface = "Smooth"
fakeLeftArm.TopSurface = "Smooth"
fakeRightArm.BottomSurface = "Smooth"
fakeRightArm.TopSurface = "Smooth"
lArm.Transparency = 1
rArm.Transparency = 1
fakeLeftArm.Name = "fakeLeftArm"
fakeRightArm.Name = "fakeRightArm"
leftWeld = Instance.new("Weld")
leftWeld.Name = "leftWeld"
leftWeld.Parent = fakeLeftArm
leftWeld.Part0 = fakeLeftArm
leftWeld.Part1 = lArm
rightWeld = Instance.new("Weld")
rightWeld.Name = "fakeRightArm"
rightWeld.Parent = fakeRightArm
rightWeld.Part0 = fakeRightArm
rightWeld.Part1 = rArm
fakeLeftArm.Parent = ArmGroup[parent]
fakeRightArm.Parent = ArmGroup[parent]
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(Char)
print("character added")
player.CharacterAppearanceLoaded:connect(function()
print("apperance")
wait(2)
for i,v in pairs(Char:GetChildren()) do
wait()
if v:IsA("CharacterMesh") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then
v:Destroy()
elseif v:IsA("BodyColors") then
v.HeadColor = BrickColor.new("Fossil")
v.RightArmColor = BrickColor.new("Fossil")
v.LeftArmColor = BrickColor.new("Fossil")
v.TorsoColor = BrickColor.new("Royal purple")
v.RightLegColor = BrickColor.new("Dark indigo")
v.LeftLegColor = BrickColor.new("Dark indigo")
end
end
armCreation(Char:WaitForChild("Left Arm"),Char:WaitForChild("Right Arm"))
end)
end)
end)
This code is supposed to give the player visible arms when they join but when they die the armGroup gets destroyed because the arms, for some reason, get destroyed.Can anyone help me prevent this.

2 comments
explain it further
You should create armGroup every time the character is added. I'll post an answer in a sec.