From cbd7189f9f5152f6d36f66ec6d2272ec64917de7 Mon Sep 17 00:00:00 2001 From: Reselim Date: Wed, 19 Aug 2020 03:44:12 -0400 Subject: [PATCH] Don't make a new connection if one already exists --- src/BaseMotor.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BaseMotor.lua b/src/BaseMotor.lua index 6375362..765114a 100644 --- a/src/BaseMotor.lua +++ b/src/BaseMotor.lua @@ -23,11 +23,11 @@ function BaseMotor:onComplete(handler) end function BaseMotor:start() - self:stop() -- Stop any existing connections, if they exist - - self._connection = RunService.RenderStepped:Connect(function(deltaTime) - self:step(deltaTime) - end) + if not self._connection then + self._connection = RunService.RenderStepped:Connect(function(deltaTime) + self:step(deltaTime) + end) + end end function BaseMotor:stop()