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: function Teleport_Teams()

Previous Thread :: Next Thread 
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
05 Nov 2013 07:29 PM
How would i do this?
Could someone give me a idea
or write out the code

thanks!
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
05 Nov 2013 07:30 PM
Loop through the players, check their TeamColor, if they are a certain TeamColor, then tele to some random spot.
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
05 Nov 2013 07:33 PM
a = game.Players:GetChildren()
b = game.Players.LocalPlayer
--so..
for i = 1, #a do
if b[i].TeamColor == game.Teams.Team1.TeamColor then
b.Character:MoveTo(what here?)
else
if b[i].TeamCOlor == game.Teams.Team2.TeamColor then
b.Character:MoveTo(idk)
end
end
end
Report Abuse
jonesj627 is not online. jonesj627
Joined: 06 Oct 2010
Total Posts: 1496
05 Nov 2013 07:34 PM
plyrs = game.Players:GeChildren()
for i = 1,#plyrs do
if plyrs[i].TeamColor == BrickColor.new("Bright red") then
plyrs[i].Character.Torso.CFrame = CFrame.new(Vector3.new(0,0,0))
end
end




ya boi
Report Abuse
jonesj627 is not online. jonesj627
Joined: 06 Oct 2010
Total Posts: 1496
05 Nov 2013 07:36 PM
plyrs = game.Players:GetChildren()
for i = 1,#plyrs do
if plyrs[i].TeamColor == BrickColor.new("Bright red") then
plyrs[i].Character.Torso.CFrame = CFrame.new(Vector3.new(0,0,0))
end
end
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
05 Nov 2013 07:38 PM
-- Do you mean this?


for _,v in pairs(game.Players:GetPlayers() do
if v.TeamColor == game.Teams.Team1.TeamColor then
v.Character:MoveTo(CFrame.new(X,Y,Z).p)
elseif v.TeamColor == game.Teams.Team2.TeamColor then
v.Character:MoveTo(CFrame.new(X,Y,Z).p)
end
end


Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
05 Nov 2013 07:39 PM
for _,v in pairs(game.Players:GetPlayers() do

to

for _,v in pairs(game.Players:GetPlayers()) do
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