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

How to make a teleport after an event?

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

✓ Accepted answer
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

4 comments

0

didnt work??

0

IT didnt work?

0

maybe theres something to the gui script, Ill edit with the count down script

0

editted

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