I'm looking for a script that can activate without being touched or clicked and teleport an entire team to a specific or multiple locations. I want to teleport the Bright red team to one specific area, but the bright blue team to be multiple areas(Different specific positions).
BrickColor.new("Bright blue") BrickColor.new("Bright red")
or simply
BrickColor.Blue --Blue transmutes to Bright blue in scripts BrickColor.Red --Red transmutes to Bright red in scripts
This is pretty simple. Get all the players and move them to a random position, by using a for loop and making sure players aren't sent to the same spawn.
for i, v in pairs(game.Players:GetPlayers()) do --gets all players in a for loop if v.TeamColor == "Bright blue" then --if their team is "Bright blue" then local bluespawns = workspace:FindFirstChild("BlueSpawns"):GetChildren() --ithis goes into workspace and finds the spawns v.Character:MoveTo(bluespawns[i].Position) --teleports them using [i] which means it will be different each time for each player end end
Make sure to read all the lines correctly. Also, if your spawns model is named differently got to line 3 and change ("BlueSpawns") to the name of your spawns model. You can have any amount of spawns. Just make sure you have enough for all players, otherwise there would be an error.