function CharacterRealism.MountLookAngle(h,Z)local S=Z.Parent local j=S and h.Rotators[S]if not j then j={Motors={},Pitch={Goal=0,Current=0};Yaw={Goal=0,Current=0}}local Z=Players:GetPlayerFromCharacter(S)if Z==h.Player then j.SnapFirstPerson=true end h.Rotators[S]=j local function y(Z)if Z:IsA("\077\111\116\111\114\054\068")then h:AddMotor(j,Z)end end for Z,h in pairs(S:GetDescendants())do y(h)end j.Listener=S.DescendantAdded:Connect(y)end return j end


function CharacterRealism:MountLookAngle(humanoid)	
	local character = humanoid.Parent
	local rotator = character and self.Rotators[character]
	
	if not rotator then
		-- Create a rotator for this character.
		rotator = 
		{
			Motors = {};
			
			Pitch =
			{
				Goal = 0;
				Current = 0;
			};

			Yaw =
			{
				Goal = 0;
				Current = 0;
			};
		}
		
		-- If this is our character, the rotation 
		-- values should not be interpolated while 
		-- the client is in first person.
		
		local player = Players:GetPlayerFromCharacter(character)
		
		if player == self.Player then
			rotator.SnapFirstPerson = true
		end
		
		-- Register this rotator for the character.
		self.Rotators[character] = rotator
		
		-- Record all existing Motor6D joints
		-- and begin recording newly added ones.
		
		local function onDescendantAdded(desc)
			if desc:IsA("Motor6D") then
				self:AddMotor(rotator, desc)
			end
		end
		
		for _,desc in pairs(character:GetDescendants()) do
			onDescendantAdded(desc)
		end
		
		rotator.Listener = character.DescendantAdded:Connect(onDescendantAdded)
	end
	
	return rotator
end
