Currently, a developer can accidently instance additional Team instances (of the same name). These could be intended for a dynamic team system, but without proper checks or silly mistakes, those can be instanced as duplicates with no warning.
This current behavior is similar to if a developer messes up cleanup, and doesn’t remove part instances that increase unchecked; but because this is connected to the performance of a Roblox core script, an argument for a special case can be made.
There is no visual indication or warning about this malpractice, so the developer is left to find out this silly mistake.
Out of hundreds of other potential things causing lag in their game, this can be frustrating that something as simple as duplicating a team instance, can wreck all this havoc.
Allowing duplicate Team instances with the same name creates silent, hard to debug issues that can break core game mechanics like player assignment. Since teams are tightly integrated with Roblox’s core scripts, the engine should either enforce unique names or provide a clear warning to help developers avoid unintended behaviour
I feel like the performance issue with PlayerListManager here should ideally outright just be fixed, there shouldn’t really be a need to have the script degrade in performance so heavily if you have duplicate entries of teams.
As for adding a warning, I have mixed feelings about that; as much as I don’t see a reason why you’d need two teams with the same name, there probably is someone with a custom player-list making use of that somewhere. Forced warnings are also pretty annoying and adding even more of them wouldn’t be ideal; we really just need a better way for these potential (but not necessarily) mistakes to be highlighted to us without spamming the console every time we hit Play.
Oh man, this warning is just like that
I know what I’m doing,
For those who don’t know, Scripts now have a RunContext property, to allow them to run as Server or Client scripts, anywhere
So in this situation, the script will run from inside StarterPack, but also inside the character when it gets duplicated.
I’ve done this in the past (before they added this stupid warning), for tools, for instance, where I’d have a projectile inside that I want to animate on every client (and not just the client owning the tool)…