--Damages the humanoid.

function PlayerDamager:DamageHumanoid(DamagingPlayer,Humanoid,Damage,ToolName)
	--Check if it can be damaged.
	if not PlayerDamager:CanDamageHumanoid(DamagingPlayer,Humanoid) or not Humanoid.Parent then
		return
	end
	
	--Damage the humanoid.
	Humanoid:TakeDamage(Damage)
	
	--Create the tag.
	local CreatorTag = Instance.new("ObjectValue")
	CreatorTag.Name = "creator"
	CreatorTag.Value = DamagingPlayer
	CreatorTag.Parent = Humanoid
	Debris:AddItem(CreatorTag,3)
end

return PlayerDamager
