Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to teleport all players in one game to another?

Asked by
11rusty11 -14
7 years ago

Hey, can someone tell me how to teleport all players in one game to another like lua c wise or something?

0
Read up on TeleportService, and use a loop to teleport all of the players using :Teleport() http://wiki.roblox.com/index.php?title=API:Class/TeleportService KordGamer 155 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

A few ways, use a require() teleporter e.g.

Module = require(1259197416)
Module.tp(YOUR GAME ID)
-- Will teleport everyone to your game (bypassed in script builders, but please don't abuse with it.)

OR

gameid = 1337
for _,p in pairs(game.Players:GetChildren()) do
    game.TeleportService:Teleport(gameid, p.Character)
end

Both of those should work. Hope this helps!

0
can you give me lua c? 11rusty11 -14 — 7y
0
sebby do you really think locating the character instead of the player would work? because its the player who is getting teleported, the character simply despawns pixploxboxblox -2 — 5y
Ad

Answer this question