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 » Scripters
Home Search
 

Re: Question

Previous Thread :: Next Thread 
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
12 Apr 2015 08:53 PM

while true do
for i=10,0,-1 do
hint.Text = "Round starts in: "..i
wait(1)
end
local player = game.Players:GetPlayers()
for i = 1, #player do
player[i].Character:MoveTo(Vector3.new(0,-10,0))--here how do i make it so for a team they telaport to a certain location and the other team goes to a diffrent vector position?
end




http://www.roblox.com/games/128848149/Nutella-on-booty?autoplay=True
Report Abuse
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
12 Apr 2015 09:00 PM
b

http://www.roblox.com/games/128848149/Nutella-on-booty?autoplay=True
Report Abuse
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
12 Apr 2015 09:15 PM
could it be like this?

table = { (0,0,0) , (10,1,5)}
and so forth?
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
12 Apr 2015 09:21 PM
local teams = {}

function teams:playersOnTeam(color)
local players = {}
for _, player in next, game.Players:GetPlayers() do
if player.TeamColor == color then
table.insert(players, player)
end
end
return players
end

function teams:split(list, players)
for index = 1, #players do
local player = table.remove(players, math.random(#players))
player.TeamColor = list[(index % #list) + 1].TeamColor
end
end

function teams:playersToPos(team, position)
local players = self:playersOnTeam(team.TeamColor)
local pos = 0
for index, player in next, players do
if player.Character then
player.Character:MoveTo(position + pos * 2.5)
pos = pos + 1
end
end
end

while true do
for i=10,0,-1 do
hint.Text = "Round starts in: "..i
wait(1)
end
-- teams:split({TEAM1, TEAM2}, game.Players:GetPlayers()) -- If you haven't already.
teams:playersToPos(TEAM1, Vector3.new())
teams:playersToPos(TEAM2, Vector3.new(10, 0, 0))
end
Report Abuse
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
12 Apr 2015 09:30 PM
noob question, for teams table do i need to put the color name or leave it blank?

http://www.roblox.com/games/128848149/Nutella-on-booty?autoplay=True
Report Abuse
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
03 May 2015 06:24 PM
second wait doesn't work
Report Abuse
flyinghotdog83 is not online. flyinghotdog83
Joined: 05 Sep 2013
Total Posts: 287
03 May 2015 06:45 PM
local hint = game.Workspace.Hint
teams = {game.Teams.Zombies, game.Teams.Survivors}
local red = 0
local blue = 0
local hint = game.Workspace.Hint
local teams = {}
function teams:playersOnTeam(color)
local players = {}
for _, player in next, game.Players:GetPlayers() do
if player.TeamColor == color then
table.insert(players, player)
end
end
return players
end

--function teams:split(list, players)
--for index = 1, #players do
--local player = table.remove(players, math.random(#players))
--player.TeamColor = list[(index % #list) + 1].TeamColor
--end
--end

function teams:playersToPos(team, position)
local players = self:playersOnTeam(team.TeamColor)
local pos = Vector3.new(0,0,0)
for index, player in next, players do
if player.Character then
player.Character:MoveTo(position + pos * 2.5)
pos = pos + 1
end
end
end

while true do
for i=10,0,-1 do
hint.Text = "Round starts in: "..i
wait(1)
end
--teams:split({game.Teams.Survivors, game.Teams.Zombies}, game.Players:GetPlayers()) -- If you haven't already.
teams:playersToPos(game.Teams.Survivors, Vector3.new(1, 39.5, 122))
teams:playersToPos(game.Teams.Zombies, Vector3.new(-68, 13.5, -111.5))

for i=90,0,-1 do--this wait does not work
hint.Text = "Time til heli arrives: "..i
wait(1)
end
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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