function FpsCamera.OnCharacterAdded(b,h)local I=b.MirrorBin if I then I:ClearAllChildren()I.Parent=nil end b.HeadMirrors={}for h,I in pairs(h:GetDescendants())do b:AddHeadMirror(I)end b:Connect("\065\100\100\072\101\097\100\077\105\114\114\111\114",h.DescendantAdded)b:Connect("\082\101\109\111\118\101\072\101\097\100\077\105\114\114\111\114",h.DescendantRemoving)end
-- Called when the player's character is added.
-- Sets up mirroring of the player's head for first person.

function FpsCamera:OnCharacterAdded(character)
	local mirrorBin = self.MirrorBin

	if mirrorBin then
		mirrorBin:ClearAllChildren()
		mirrorBin.Parent = nil
	end

	self.HeadMirrors = {}

	for _, desc in pairs(character:GetDescendants()) do
		self:AddHeadMirror(desc)
	end

	self:Connect("AddHeadMirror", character.DescendantAdded)
	self:Connect("RemoveHeadMirror", character.DescendantRemoving)
end
