Mid round spawning in a teamdeathmatch gamemode

Hey guys! I am currently making a server with a teamdeathmatch gamemode, but you cannot spawn mid round. I am very new to coding as you can see by my other posts and just wondering which bit of code I would need to edit to change this. Here is the github files of the gamemode, thanks in advance for the help : https://github.com/chaos12135/APPLES-TDM-GAMEMODE

just check for playerinitialspawn, make them a team, and so player:Spawn()?