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

Lua C? How to teleport all users in one game to another? [closed]

Asked by
11rusty11 -14
6 years ago

How to teleport all users in one game to another in lua c. Someone help

0
stop exploiting roblox doesn't use LUA C Voltoxus 248 — 6y

Closed as Not Constructive by Voltoxus, pluginfactory, RayCurse, and TheeDeathCaster

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 6 years ago

To teleport all players in one game to another, use these lines of code:

gameid = 1234 -- Change this to the game ID that you want players to teleport to
for _,p in pairs(game.Players:GetChildren()) do
    game.TeleportService:Teleport(gameid, p.Character)
end

To teleport a single player, use these three lines of code:

gameid = 1234 -- Change this to the game ID you want to teleport to
player = game.Players.TP -- Change TP to the name of the player you want to teleport
game.TeleportService:Teleport(gameid, player.Character)
Ad