peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
|
| 31 Aug 2014 02:09 PM |
I need help with a script that would teleport all players who are in the game.
--
while true do wait(900) Players = game.Players --- And that's where I'm pretty much stuck
game:GetService("TeleportService"):Teleport(154663911, Players)
end
--
So how do I reference all the players and do it all at once? |
|
|
| Report Abuse |
|
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 31 Aug 2014 02:14 PM |
If you're going to a game, then do this:
while true do wait(900) for k, v in pairs(game.Players:GetChildren()) do game:GetService("TeleportService"):Teleport(154663911, v) end
I'm not a pro with place teleporting, but that should do the trick.
Have a great day :) |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 31 Aug 2014 02:15 PM |
while wait(900) do for i,v in pairs(game.Players:GetPlayers()) do game:GetService("TeleportService"):Teleport(154663911, v) end end |
|
|
| Report Abuse |
|
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
|
| 31 Aug 2014 02:38 PM |
| Oh actually nope. Is there a way to make this so that at the click of a gui (with a local script) it places everyone (or the original one in a local script). |
|
|
| Report Abuse |
|
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 31 Aug 2014 02:40 PM |
script.Parent.TextButton.MouseButton1Click:connect(function() for k, v in pairs(game.Players:GetChildren()) do game:GetService("TeleportService"):Teleport(154663911, v) end end)
Does that work?
Have a nice day! :) |
|
|
| Report Abuse |
|
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
kalkara
|
  |
| Joined: 08 Oct 2008 |
| Total Posts: 576 |
|
|
| 31 Aug 2014 03:35 PM |
script.Parent.MouseButton1Click:connect(function() for k, v in pairs(game.Players:GetChildren()) do game:GetService("TeleportService"):Teleport(154663911, v) end end) |
|
|
| Report Abuse |
|
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
|
| 31 Aug 2014 03:44 PM |
hm seems none of this is working the way I wanted it to.
Okay, instead of doing it like that what about if it was something like:
game.Players.Peach815 -- then the teleport part
(so it makes whatever person that was referenced get teleported to whatever place) |
|
|
| Report Abuse |
|
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|
peach815
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 29 |
|
| |
|