Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Teleport everyone in my game to another game using TeleportService?

local Teleport = game:GetService('TeleportService') -- Get Teleport Service
function teleport(Teleport)
	Teleport.CustomizedTeleportUI = true
	for l,y in pairs(Teleport:GetChildren()) do
		o(y)
		if Teleport:IsA("Player")
			then
			game:GetService('TeleportService'):Teleport(IdHere) -- Place Id specified 
		end
	end
end
teleport()

I want to teleport everyone who is a Player to another game without prompt hence why I used CustomizedTeleportUI because it does not prompt if I use it. But when I tested the script it does not work, some feedback would be very nice

1 answer

✓ Accepted answer

I would do:

local id = 000000 --change this to the teleport place id
for i, v in pairs(game.Players:GetChildren()) do
game:GetService("TeleportService"):Teleport(id)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.