IM relatively new to scripting and what I'm trying to do is teleport all players to their own individual brick. I plan on scripting a cutscene that shows all the players before the game begins. I don't have a script to show because I don't even know where to begin! Please help point me in the direction of where to begin!
COMMUNITY QUESTION
How do you teleport a team of players to their own brick?
1 answer
For future reference, try to atleast put a little bit of effort, but since you don't know where to begin I can help start you off.
I don't know when you plan on teleporting the players, so I'll just show you a function for it.
function TeleportTeamPlayers(teamspawn,teamcolor)
for i,player in pairs(game:GetService("Players"):GetPlayers())do
if player.TeamColor = teamcolor then
player.LowerTorso.CFrame = teamspawn.CFrame
end
end
end
This function loops through all the players in the game, then if they are on a certain team, they are teleported to that teams spawn. To use this, all you have to do is call the function by doing TeleportTeamPlayers(teamspawn,teamcolor) but replacing teamspawn with a brick that you want the specific color to spawn on, and teamcolor with the color of the team you want to teleport.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you but not quite what I'm looking for. I'm not even looking for someone to write a script for me either. What I'm looking for is someone to point me in the right direction to, loop through all the players, then teleport individual players to their own individual brick. They change teams after the cut scene.
Oh okay. The loop I used is pretty simple but if you don’t understand that you can research different loops, also if research CFrame to move the player and moving them is as simple as changing the cframe of their humanoidrootpadt