Emperoar
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 382 |
|
|
| 13 Sep 2015 02:48 PM |
pos1 = 1 pos2 = 2 pos3 = 3 pos4 = 4
How would I have all the players in the game teleported randomly to any of these locations from a localscript in the StarterPlayerScripts?
~Emperoar~ |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 02:55 PM |
math.random(1,4) #code return |
|
|
| Report Abuse |
|
|
Emperoar
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 382 |
|
|
| 13 Sep 2015 03:04 PM |
i tried
for i = 1, #1player (math.random(1,4))
if i == 1 then (teleport to pos1) end
etc.
but that didn't work...
~Emperoar~ |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 03:07 PM |
local tab = {{1,2,3},{1,2,3}}
local p = tab[math.random(#tab)] local pos = Vector3.new(p[1],p[2],p[3]) |
|
|
| Report Abuse |
|
|