--- Searches for attachments for the given instance (if applicable)

function Hitbox:Recalibrate()
	local descendants: {[number]: Instance} = self.HitboxObject:GetDescendants()
	local attachmentCount: number = 0

	for _, attachment: any in ipairs(descendants) do
		if not attachment:IsA("Attachment") or attachment.Name ~= DEFAULT_ATTACHMENT_INSTANCE then
			continue
		end

		local group: string? = attachment:GetAttribute(DEFAULT_GROUP_NAME_INSTANCE)
		local point: Point = self:_CreatePoint(group, Hitbox.CastModes.Attachment, attachment.WorldPosition)

		table.insert(point.Instances, attachment)
		table.insert(self.HitboxRaycastPoints, point)

		attachmentCount += 1
	end

	if self.DebugLog then
		print(string.format("%s%s", DEFAULT_DEBUG_LOGGER_PREFIX,
			attachmentCount > 0 and string.format(DEFAULT_ATTACH_COUNT_NOTICE, attachmentCount, self.HitboxObject.Name) or
				string.format(DEFAULT_MISSING_ATTACHMENTS, self.HitboxObject.Name))
		)
	end
end
