-- loop through all the arm parts and make them visible in first person

local function setArmVisibility(bool)
	local castshadow = not bool
	for i, part in ipairs(ArmPartsTable) do
		part.LocalTransparencyModifier = armTransparency
		part.CastShadow = castshadow
	end
end

local function toggleViewmodel(toggle)
	isFirstPerson = toggle --// Update the first person state
	Viewmodel.Parent = toggle and workspace.CurrentCamera or nil --// Put the Viewmodel in the camera, or take it out
	RightShoulderClone.Enabled = toggle --// Update joints
	LeftShoulderClone.Enabled = toggle
	LeftShoulder.Enabled = (not toggle) --// Update the original joints (to prevent :fling incidents)
	RightShoulder.Enabled = (not toggle)
	if toggle then
		RightShoulderClone.Part1 = RightArm
		RightShoulderClone.Part0 = FakeTorso
		RightShoulderClone.Parent = FakeTorso
		--// I'm not sure what the point of doing this here is. I'm too scared to change it though because this code is AWFUL.
		--// God knows what would happen.
		LeftShoulderClone.Part1 = LeftArm
		LeftShoulderClone.Part0 = FakeTorso
		LeftShoulderClone.Parent = FakeTorso
	end
end

