generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Teleport All Script

Previous Thread :: Next Thread 
BlueBlood12 is not online. BlueBlood12
Joined: 07 Jul 2011
Total Posts: 1377
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 is not online. 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 is not online. 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
BlueBlood12 is not online. BlueBlood12
Joined: 07 Jul 2011
Total Posts: 1377
28 Jun 2013 03:08 PM
Okay thanks ill test those out.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image