|
| 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 |
|
|
|
| 12 Apr 2015 09:00 PM |
b
http://www.roblox.com/games/128848149/Nutella-on-booty?autoplay=True |
|
|
| Report Abuse |
|
|
|
| 12 Apr 2015 09:15 PM |
could it be like this?
table = { (0,0,0) , (10,1,5)} and so forth? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|