Packers
|
  |
| Joined: 14 Sep 2007 |
| Total Posts: 4 |
|
|
| 04 Dec 2017 01:49 AM |
how to make script where it teleports all the players to a place id.
im making my own admin script and i wanna learn how
|
|
|
| Report Abuse |
|
|
Shiro75
|
  |
| Joined: 18 Jan 2010 |
| Total Posts: 587 |
|
|
| 04 Dec 2017 02:19 AM |
| 1. use the GetChildren function to get the list of all players in the server ## ### # #### to go through all the players in the server 3. for each player (inside the loop), use game:GetService('TeleportService'):Teleport(placeid, player) |
|
|
| Report Abuse |
|
|
Packers
|
  |
| Joined: 14 Sep 2007 |
| Total Posts: 4 |
|
|
| 04 Dec 2017 02:30 AM |
ooo okay so like
game:GetService('TeleportService'):Teleport(415795179, packers) ??
|
|
|
| Report Abuse |
|
|
Packers
|
  |
| Joined: 14 Sep 2007 |
| Total Posts: 4 |
|
|
| 04 Dec 2017 02:32 AM |
ok so i tried running the script in the developer console on my friend while we were in a game, and it just teleported me instead of him..
|
|
|
| Report Abuse |
|
|
decla123
|
  |
| Joined: 08 Jun 2011 |
| Total Posts: 112 |
|
|
| 04 Dec 2017 03:39 AM |
local placeId = 0 local service = game:GetService("TeleportService")
function teleportAll() local plrs = game.Players:GetChildren() for i = 1, #plrs do service:Teleport(plrs[i], placeId) end end
then use a function caller.
* plz fix anything if i messed up xD |
|
|
| Report Abuse |
|
|