|
| 28 Jun 2013 03:02 PM |
| How would I go about making a script that teleports everyone to a specific part or place? |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 28 Jun 2013 03:03 PM |
for i,v in pairs(game.Players:GetChildren()) do if v.className == "Player" and v.Character and v.Character:FindFirstChild("Torso") then v.Character.Torso.CFrame = CFrame.new(Vector3.new(500, 500, 500)) -- or something end end |
|
|
| Report Abuse |
|
|
IAmAMelon
|
  |
| Joined: 14 Mar 2013 |
| Total Posts: 167 |
|
|
| 28 Jun 2013 03:06 PM |
If you mean by moving players to a location inside the game, then this is how you do it.
First, we need a location to use, it can be a part, a Vector3, or a CFrame.
location = workspace.Part.CFrame -- We'll use the parts CFrame for this example
Next, you would get a table or "list" of all the players:
players = game.Players:GetChildren() -- Returns a table of all the players.
Then, we would loop through them:
for index, player in pairs(players) do -- Iterates through the table player.Character.Torso.CFrame = location -- Sets the players position end
And that will teleport all players to the part. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2013 03:08 PM |
| Okay thanks ill test those out. |
|
|
| Report Abuse |
|
|