File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ function Class.Start(): { Stop: () -> () }
645645 SB_UNINDENT_LOG ()
646646 end
647647
648- CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
648+ connection = CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
649649
650650 for _ , Object in CollectionService :GetTagged ("SmartBone" ) do
651651 SetupObject (Object )
@@ -681,6 +681,11 @@ function Class.Start(): { Stop: () -> () }
681681 for _ , Actor : Actor in ActorFolder :GetChildren () do
682682 Actor :SendMessage ("Destroy" )
683683 end
684+
685+ if connection then
686+ connection :Disconnect ()
687+ connection = nil
688+ end
684689 end ,
685690 }
686691end
Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ function Class.Start(): { Stop: () -> () }
645645 SB_UNINDENT_LOG ()
646646 end
647647
648- CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
648+ connection = CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
649649
650650 for _ , Object in CollectionService :GetTagged ("SmartBone" ) do
651651 SetupObject (Object )
@@ -681,6 +681,11 @@ function Class.Start(): { Stop: () -> () }
681681 for _ , Actor : Actor in ActorFolder :GetChildren () do
682682 Actor :SendMessage ("Destroy" )
683683 end
684+
685+ if connection then
686+ connection :Disconnect ()
687+ connection = nil
688+ end
684689 end ,
685690 }
686691end
You can’t perform that action at this time.
0 commit comments