Automatic Roblox Luau Team Balancing
Generate a robust automatic balancing system for Roblox matches, designed to run authoritatively on the server. The script distributes players between teams, monitors joins and leaves, avoids excessive swapping, and can account for capacity limits, spectator/lobby teams, and skill differences when data is available.
The prompt requests the real context of your project — Explorer structure, Team object names, Attributes, RemoteEvents, and specific rules — before producing a ready-to-paste Luau code file. It is intended for developers who need a scalable and secure solution for competitive, cooperative, or round-based games.
Act as a senior Roblox developer, specializing in Luau, multiplayer architecture, and server-authoritative systems. Create a complete automatic team balancing system using a server Script in ServerScriptService, adapted to the context of my game provided below.