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

How do i script --> countdown then teleport?

1 answer

In this script we're going to use the wait function, a for loop, and TeleportService:Teleport().

local timeUntilTeleport	= 30		-- time in seconds
local placeId			= 1234567	-- destination placeId

wait(timeUntilTeleport)
for _,plr in next, game.Players:GetPlayers() do
	game:GetService("TeleportService"):Teleport(placeId, plr)
end

This code would wait 30 seconds and then teleport everyone in the game to the desired placeId.

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