|
| 10 Apr 2014 07:42 PM |
--McChicken72. plyr = -- i need to define all would i use game:GetPlayers() ?
function MB1D() game:GetService("TeleportService"):Teleport(0000000, plyr) end end) script.Parent.MouseButton1Down:connect(MB1D)
i have the vote and it works, i just need to define ALL players, the vote btw is when 3 people vote out of 5 in the game, they all tele to place2 (part 2 of the game)
so basically, just define plyr pls |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Apr 2014 07:43 PM |
That would return a table of all the players [game.Players:GetPlayers()], so you would have to do something like:
function MB1D() local plyrs = Game.Players:GetPlayers() for index, value in next, plyrs do game:GetService("TeleportService"):Teleport(0000000, value) end end end
script.Parent.MouseButton1Down:connect(MB1D)
This must be in a server-side script as well |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2014 07:46 PM |
| I dont get that, so i just replace the 00000 with place ID and im good to go (after i put in the vote) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Apr 2014 07:49 PM |
| yes, assuming this is not in a local script |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2014 07:51 PM |
| It is regular, or it wont teleport all, it would break my vote script. |
|
|
| Report Abuse |
|
|