Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help with a script?

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

2 comments

0

Don't repost a question

0

This isn't a repost stupid

2 answers

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

This discussion is preserved as it was. New answers, comments, and votes are closed.