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 @@ -639,7 +639,7 @@ function Class.Start(): { Stop: () -> () }
639639 SB_UNINDENT_LOG ()
640640 end
641641
642- CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
642+ connection = CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
643643
644644 for _ , Object in CollectionService :GetTagged ("SmartBone" ) do
645645 SetupObject (Object )
@@ -675,6 +675,11 @@ function Class.Start(): { Stop: () -> () }
675675 for _ , Actor : Actor in ActorFolder :GetChildren () do
676676 Actor :SendMessage ("Destroy" )
677677 end
678+
679+ if connection then
680+ connection :Disconnect ()
681+ connection = nil
682+ end
678683 end ,
679684 }
680685end
Original file line number Diff line number Diff line change @@ -639,7 +639,7 @@ function Class.Start(): { Stop: () -> () }
639639 SB_UNINDENT_LOG ()
640640 end
641641
642- CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
642+ connection = CollectionService :GetInstanceAddedSignal ("SmartBone" ):Connect (SetupObject )
643643
644644 for _ , Object in CollectionService :GetTagged ("SmartBone" ) do
645645 SetupObject (Object )
@@ -675,6 +675,11 @@ function Class.Start(): { Stop: () -> () }
675675 for _ , Actor : Actor in ActorFolder :GetChildren () do
676676 Actor :SendMessage ("Destroy" )
677677 end
678+
679+ if connection then
680+ connection :Disconnect ()
681+ connection = nil
682+ end
678683 end ,
679684 }
680685end
You can’t perform that action at this time.
0 commit comments