FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
| |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:09 AM |
| Workspace.Noob:MoveTo (Vector3.new (0,0,0)) |
|
|
| Report Abuse |
|
|
Mlatu
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 540 |
|
|
| 29 Jul 2014 11:10 AM |
playerName = "Mlatu" playerDestination = CFrame.new(100,4,100) game.Players:FindFirstChild(playerName).Character.Torso.CFrame = playerDestination |
|
|
| Report Abuse |
|
|
FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
|
| 29 Jul 2014 11:17 AM |
| What about moving to different spawns located in the map? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:17 AM |
| Workspace.Noob:MoveTo (Workspace.SpawnLocation.Position) |
|
|
| Report Abuse |
|
|
FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
|
| 29 Jul 2014 11:37 AM |
| So how would you move a team? |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2014 11:42 AM |
| use an if statement to determine their teamcolor, then teleport them based off of that |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 11:43 AM |
That's a bit out of your league, but I'll explain it to you anyway:
GetPlayers () is used on game.Players and gets all the players in the game, putting them in a table
for index,value in pairs (tablename) do --processes every element in a table (like one called by GetPlayers ())
if statement to check the player's team color
value.Character is a way to index the player's character in Workspace through game.Players
:MoveTo () as I said before, teleports objects and models |
|
|
| Report Abuse |
|
|
FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
|
| 29 Jul 2014 10:42 PM |
Go over the I,v in pairs And also about the v.Character thing you just said |
|
|
| Report Abuse |
|
|
FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Jul 2014 10:56 PM |
the in pairs will take every element in the table (which in this case is all the players in the game) and process them individually in the loop.
So you can think of v as a player, and since it's a variable and you can name it almost anything, let's change it to player
for i,player in pairs (game.Players:GetPlayers ()) do player.Character:MoveTo (Workspace.SpawnLocation.Position) end |
|
|
| Report Abuse |
|
|
FruitsZ
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 25722 |
|
|
| 29 Jul 2014 11:04 PM |
| What about the v.Character |
|
|
| Report Abuse |
|
|