I need a script that kills the players, then changes their team to "In the Blitz" which is the color Bright Blue. Here is what I tried...
while true do wait(5) function setTeam(player, teamName) player.TeamColor = game.Teams["In the Blitz"].TeamColor if player.Character then --Just in case the character doesn't exist for some reason player.Character:BreakJoints() -- Kills the players' character end end
Thanks!
A while true do loop will cause your game to crash. Also, you didn't properly define the player variable.
for i,plr in pairs(game.Players:GetChildren()) do plr.TeamColor = game.Teams["In the Blitz"].TeamColor plr.Character:BreakJoints() end