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

How to make a teleport after an event?

Asked by 10 years ago

Teleport script

if game.Workspace.Bool.Value == true then
    local g = {game.Players:GetChildren()}
    for i = 1, #g do
        g[i].Character:Moveto(Vector3.new(0,0,0))
    end
end

GUI script

time = 20

if game.Players.NumPlayers >= 1 then
    script.Parent.Text = "Pick your team before times up"
    for i = 1, 20 do 
        wait(1)
        time = time - 1
        script.Parent.Text = "Round begins in: "..tostring(time)..""
    end
    script.Parent.Text = "Let the game begin"
    game.Workspace.Bool.Value = true
end

I have this countdown GUI and after it hits 0, it sets a BoolValue to true, and I want it to teleport all the people in one area to a certain part of the map and the rest of the people in a different area to a different part of the map

1 answer

Log in to vote
0
Answered by
Hybric 271 Moderation Voter
10 years ago
if game.Workspace.Bool.Value == true then
local g = {game.Players:GetChildren()}
for i = 1, #g do
g[i].Character:Moveto(Vector3.new(0,0,0))
end
end
0
didnt work?? NinjoOnline 1146 — 10y
0
IT didnt work? Hybric 271 — 10y
0
maybe theres something to the gui script, Ill edit with the count down script NinjoOnline 1146 — 10y
0
editted NinjoOnline 1146 — 10y
Ad

Answer this question