When a player leaves, will all connections of Players.PlayerAdded get automatically cleaned up?

When a player leaves, will all connections of Players.PlayerAdded get automatically cleaned up?

Similarly, when an object is destroyed, what will happen?

What about when one is removed, not destroyed?

No, they only disconnect if the object is destroyed, the object can be the script or the connection object. Any connection within a connection will remain even if the principal connection is disconnected.

Players.PlayerAdded is in no way related to a spesific player. It is related to the service Players. So the answer is no. Did you mean Player.CharacterAdded?

All connections to its events will be disconnected.

Nothing will change, as someone can still parent them to something.

1 Like

No, I did not.

All connections to its events will be disconnected.

Alright, that’s what I was looking for, thanks!

Nothing will change, as someone can still parent them to something.

Noted.

Yep that’s true but for player instances it’s a special case since it doesn’t automatically destroy itself on player removing.

There should be a work around as mentioned in the engine feature post below.

1 Like

Is there a way with F9, to actually visualize connections?