Client Type (ex. PC, Android, Webclient): PC Client Version (if known. Webclient has no version.): v2.7.1 When did you first notice the bug?: Today Have you been able to reproduce the bug?: Yes, just use that function. Information (include relevant logs, replays, screenshots): The function "sys.setTeamToBattleTeam" doesn't work on the beforeBattleEnded event. Spoiler: The Bug (If applicable) Sources to confirm the presence of a bug (ex. Smogon): sys.setTeamToBattleTeam(playerId, team, battleId) Sets the team of playerId of the team they had at the end of battleId. Only works when used in beforeBattleEnded. For example if at the end of the battle he had 5 pokemon koed, then at the next battle he'll only have one pokemon not koed. I would appreciate if you could tell me how i can activate this function or in other case, can you tell me how i can fix it?