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

How do you teleport all players to another game?

Asked by 4 years ago

I don't know how to teleport all players to another game using a server script. I need help!

1 answer

Log in to vote
0
Answered by 4 years ago

use this script

local id = 123456789 -- replace 123456789 with the id of your place you want the players to teleport to
local ts = game:GetService("TeleportService")
-- maybe you could add a function here but this script will just tp all the players right away i think you should add like a while true loop this is what i will do
while wait(25) do
local players = game.Players:GetPlayers() -- create the table
for i, v in pairs(players) do -- do a function for each part of the table

ts:Teleport(id, v)

end

this should teleport all players to the other game every 25 seconds!

Ad

Answer this question