         animation.path = path.cgPath
         animation.repeatCount = count
         animation.duration = duration
-        animation.autoreverses = false
+        animation.autoreverses = autoreverses
         
         self.layer.add(animation, forKey: "animateAlongPath")
     }

    
    // MARK: - Functions
    
    /// Creates a border around the UIView.
    ///
    /// - Parameters:

    @IBInspectable public var borderColor: UIColor {
        get {
            guard let borderColor = self.layer.borderColor else {
                return UIColor.clear
            }
            return UIColor(cgColor: borderColor)
        }
