So I have script that teleports players but I have 2 teams and the script teleports all of them to the same place how would I make it teleport people on one team somewhere and the other team somewhere else
local locations={ ["Bright blue"]=Vector3.new(200,10,0), ["Bright red"]=Vector3.new(-200,10,0), ["Bright green"]=Vector3.new(0,10,200), ["Bright yellow"]=Vector3.new(0,10,-200) } for _,v in pairs(game.Players:GetPlayers())do if v.Character then v.Character:MoveTo(locations[tostring(v.TeamColor)]) end end
Change the positions of the teams by name of their color (not by name of the team) in the table.
Im going to make a guess, Use this for the part
local p = game.Players:GetChildren() for s = 1, #p do if p[s].TeamColor == "TEAM COLOR 1 HERE" then p[s].Character:MoveTo(Vector3.new(PASTE POSITION HERE)) else if p[s].TeamColor == "TEAM COLOR 2 HERE" then p[s].Character:MoveTo(Vector3.new(PASTE POSITION FOR TEAM 2 HERE)) -- IF YOUR SCRIPT ADD THREE ENDS TO IT SO IT WILL WORK