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: How would you teleport people around?

Previous Thread :: Next Thread 
FruitsZ is not online. FruitsZ
Joined: 22 Jan 2013
Total Posts: 25722
29 Jul 2014 11:09 AM
?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
29 Jul 2014 11:09 AM
be more specific
Report Abuse
maxomega3 is not online. 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 is not online. 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 is not online. 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 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
29 Jul 2014 11:17 AM
Workspace.Noob:MoveTo (Workspace.SpawnLocation.Position)
Report Abuse
FruitsZ is not online. FruitsZ
Joined: 22 Jan 2013
Total Posts: 25722
29 Jul 2014 11:37 AM
So how would you move a team?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
29 Jul 2014 11:42 AM
use an if statement to determine their teamcolor, then teleport them based off of that
Report Abuse
maxomega3 is not online. 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 is not online. 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 is not online. FruitsZ
Joined: 22 Jan 2013
Total Posts: 25722
29 Jul 2014 10:55 PM
B1
Report Abuse
maxomega3 is not online. 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 is not online. FruitsZ
Joined: 22 Jan 2013
Total Posts: 25722
29 Jul 2014 11:04 PM
What about the v.Character
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