local Connections = {} local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
Connections[Player.Name] = Player.CharacterAdded:Connect(function(Character) end)
end)
Players.PlayerRemoving:Connect(function(Player)
Connections[Player.Name]:Disconnect()
When the player leaves, it is Destroyed, which means all existing connections will be free for garbage collection (deletion). In other words, you don’t need to manually disconnect these connections.
Destroy
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.