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

How do i script --> countdown then teleport? [closed]

Asked by 8 years ago

please tell me how to script after countdown then everyone get teleport D:

Closed as Not Constructive by ScriptGuider and M39a9am3R

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
0
Answered by 8 years ago

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.

Ad